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

Commit 256a877a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "BufferQueueProducer: Slot may have null buffer" into rvc-dev

parents a6a1995f fc069ba5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -655,8 +655,9 @@ status_t BufferQueueProducer::detachBuffer(int slot) {
        }

        listener = mCore->mConsumerListener;
        if (listener != nullptr) {
            listener->onFrameDetached(mSlots[slot].mGraphicBuffer->getId());
        auto gb = mSlots[slot].mGraphicBuffer;
        if (listener != nullptr && gb != nullptr) {
            listener->onFrameDetached(gb->getId());
        }
        mSlots[slot].mBufferState.detachProducer();
        mCore->mActiveBuffers.erase(slot);