Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c34597c4 authored by John Reck's avatar John Reck
Browse files

Abort if realloc failed

Bug: 162942933
Test: none
Change-Id: Ic5c1d2da3e496c3eb790a40b7945f58d8afeb977
parent 408f136b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -524,6 +524,7 @@ void* DisplayListData::push(size_t pod, Args&&... args) {
        // Next greater multiple of SKLITEDL_PAGE.
        fReserved = (fUsed + skip + SKLITEDL_PAGE) & ~(SKLITEDL_PAGE - 1);
        fBytes.realloc(fReserved);
        LOG_ALWAYS_FATAL_IF(fBytes.get() == nullptr, "realloc(%zd) failed", fReserved);
    }
    SkASSERT(fUsed + skip <= fReserved);
    auto op = (T*)(fBytes.get() + fUsed);