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

Commit a81aa942 authored by Alec Mouri's avatar Alec Mouri Committed by Android (Google) Code Review
Browse files

Merge "[RenderEngine] Fix use-after-move error" into rvc-dev

parents af41494f 8e82b8d9
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -957,10 +957,14 @@ status_t GLESRenderEngine::drawLayers(const DisplaySettings& display,
        return NO_ERROR;
    }

    if (bufferFence.get() >= 0 && !waitFence(std::move(bufferFence))) {
    if (bufferFence.get() >= 0) {
        // Duplicate the fence for passing to waitFence.
        base::unique_fd bufferFenceDup(dup(bufferFence.get()));
        if (bufferFenceDup < 0 || !waitFence(std::move(bufferFenceDup))) {
            ATRACE_NAME("Waiting before draw");
            sync_wait(bufferFence.get(), -1);
        }
    }

    if (buffer == nullptr) {
        ALOGE("No output buffer provided. Aborting GPU composition.");