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

Commit ab581a4c authored by chaviw's avatar chaviw
Browse files

Check for null mBlastBufferQueue

If there is a sync transaction, but blast is not enabled,
mNextDrawUseBLASTSyncTransaction will be true, but mBlastBufferQueue
will be null. This will cause a NPE when trying to call
mBlastBufferQueue.setNextTransaction

Test: Use sync transaction without blast
Fixes: 154527936
Change-Id: Ibff2de7fc7460f882acaceb0182c68ea4b05afb7
parent ae4605ee
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -3769,8 +3769,10 @@ public final class ViewRootImpl implements ViewParent,
                mNextReportConsumeBLAST = true;
                mNextReportConsumeBLAST = true;
                mNextDrawUseBLASTSyncTransaction = false;
                mNextDrawUseBLASTSyncTransaction = false;


                if (mBlastBufferQueue != null) {
                    mBlastBufferQueue.setNextTransaction(mRtBLASTSyncTransaction);
                    mBlastBufferQueue.setNextTransaction(mRtBLASTSyncTransaction);
                }
                }
            }
            boolean canUseAsync = draw(fullRedrawNeeded);
            boolean canUseAsync = draw(fullRedrawNeeded);
            if (usingAsyncReport && !canUseAsync) {
            if (usingAsyncReport && !canUseAsync) {
                mAttachInfo.mThreadedRenderer.setFrameCompleteCallback(null);
                mAttachInfo.mThreadedRenderer.setFrameCompleteCallback(null);