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

Commit 9d52f998 authored by Vishnu Nair's avatar Vishnu Nair Committed by Android (Google) Code Review
Browse files

Merge "Fix releaseBufferCallback null pointer dereference" into sc-dev

parents 0d798696 5faedf56
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -292,8 +292,11 @@ void TransactionCompletedListener::onTransactionCompleted(ListenerStats listener
                // callback and a release buffer callback happening at the same time to avoid an
                // additional ipc call from the server.
                if (surfaceStats.previousBufferId) {
                    ReleaseBufferCallback callback =
                            popReleaseBufferCallbackLocked(surfaceStats.previousBufferId);
                    ReleaseBufferCallback callback;
                    {
                        std::scoped_lock<std::mutex> lock(mMutex);
                        callback = popReleaseBufferCallbackLocked(surfaceStats.previousBufferId);
                    }
                    if (callback) {
                        callback(surfaceStats.previousBufferId,
                                 surfaceStats.previousReleaseFence