diff --git a/services/surfaceflinger/TransactionCompletedThread.cpp b/services/surfaceflinger/TransactionCompletedThread.cpp index 0cdff8f380..ca244934e4 100644 --- a/services/surfaceflinger/TransactionCompletedThread.cpp +++ b/services/surfaceflinger/TransactionCompletedThread.cpp @@ -154,6 +154,9 @@ status_t TransactionCompletedThread::registerPendingCallbackHandle( status_t TransactionCompletedThread::finalizePendingCallbackHandles( const std::deque>& handles) { + if (handles.empty()) { + return NO_ERROR; + } std::lock_guard lock(mMutex); if (!mRunning) { ALOGE("cannot add presented callback handle because the callback thread isn't running");