mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 23:45:51 +00:00
Prevent crashing when we try to delete a non-existent offer.
This commit is contained in:
@@ -985,8 +985,10 @@ TER LedgerEntrySet::offerDelete(SLE::ref sleOffer, const uint256& uOfferIndex, c
|
||||
TER LedgerEntrySet::offerDelete(const uint256& uOfferIndex)
|
||||
{
|
||||
SLE::pointer sleOffer = entryCache(ltOFFER, uOfferIndex);
|
||||
const uint160 uOwnerID = sleOffer->getFieldAccount(sfAccount).getAccountID();
|
||||
if (!sleOffer)
|
||||
return tesSUCCESS;
|
||||
|
||||
const uint160 uOwnerID = sleOffer->getFieldAccount160(sfAccount);
|
||||
return offerDelete(sleOffer, uOfferIndex, uOwnerID);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user