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

Commit 30c8d907 authored by Robert Carr's avatar Robert Carr Committed by Rob Carr
Browse files

SurfaceComposerClient: Fix potential null de-reference in setRelativeLayer

Obviously the code immediately following the diff was going to segfault if we didnt
return. Looks like just a trivial refactoring error.

Bug: 76148527
Test: Trivial.
Change-Id: I0b575e0d8123d57d8110c9450c7a623c65bcd87c
parent 8c810106
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -620,6 +620,7 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setRelat
    layer_state_t* s = getLayerState(sc);
    if (!s) {
        mStatus = BAD_INDEX;
        return *this;
    }
    s->what |= layer_state_t::eRelativeLayerChanged;
    s->relativeLayerHandle = relativeTo;