mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 16:56:48 +00:00
fix Unchecked std::optional Dereference in SponsorshipSet Create Path
This commit is contained in:
@@ -260,10 +260,14 @@ SponsorshipSet::doApply()
|
||||
|
||||
auto const sponsorPage = view().dirInsert(
|
||||
keylet::ownerDir(sponsorAccountID), sponsorKeylet, describeOwnerDir(sponsorAccountID));
|
||||
if (!sponsorPage)
|
||||
return tecDIR_FULL; // LCOV_EXCL_LINE
|
||||
(*newSle)[sfOwnerNode] = *sponsorPage;
|
||||
|
||||
auto const sponseePage = view().dirInsert(
|
||||
keylet::ownerDir(sponseeAccountID), sponsorKeylet, describeOwnerDir(sponseeAccountID));
|
||||
if (!sponseePage)
|
||||
return tecDIR_FULL; // LCOV_EXCL_LINE
|
||||
(*newSle)[sfSponseeNode] = *sponseePage;
|
||||
|
||||
adjustOwnerCount(view(), sponsorAccSle, reserveSponsorAccSle, 1, ctx_.journal);
|
||||
|
||||
Reference in New Issue
Block a user