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

Commit 3bddd5b7 authored by Pablo Ceballos's avatar Pablo Ceballos
Browse files

SF: Don't use pointer if promote() fails

Bug 25759725

Change-Id: I51f82154bf86ded24503c07f1932b115aa709cd4
parent 2e1d20d3
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -953,11 +953,12 @@ void Layer::pushPendingState() {
            // then it is expired or otherwise invalid. Allow this transaction
            // to be applied as per normal (no synchronization).
            mCurrentState.handle = nullptr;
        }

        auto syncPoint = std::make_shared<SyncPoint>(mCurrentState.frameNumber);
        } else {
            auto syncPoint = std::make_shared<SyncPoint>(
                    mCurrentState.frameNumber);
            handleLayer->addSyncPoint(syncPoint);
            mRemoteSyncPoints.push_back(std::move(syncPoint));
        }

        // Wake us up to check if the frame has been received
        setTransactionFlags(eTransactionNeeded);