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

Commit 4400b39a authored by Sally Qi's avatar Sally Qi Committed by Android (Google) Code Review
Browse files

Merge "Check optional before accessing the data." into main

parents 8472c5b0 5f076a63
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -411,7 +411,8 @@ void CanvasContext::prepareTree(TreeInfo& info, int64_t* uiFrameInfo, int64_t sy

    // If the previous frame was dropped we don't need to hold onto it, so
    // just keep using the previous frame's structure instead
    if (const auto reason = wasSkipped(mCurrentFrameInfo)) {
    const auto reason = wasSkipped(mCurrentFrameInfo);
    if (reason.has_value()) {
        // Use the oldest skipped frame in case we skip more than a single frame
        if (!mSkippedFrameInfo) {
            switch (*reason) {