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
This commit is contained in:
chaviw
2020-04-20 12:48:19 -07:00
parent ae4605eee8
commit ab581a4c04

View File

@@ -3769,7 +3769,9 @@ public final class ViewRootImpl implements ViewParent,
mNextReportConsumeBLAST = true;
mNextDrawUseBLASTSyncTransaction = false;
mBlastBufferQueue.setNextTransaction(mRtBLASTSyncTransaction);
if (mBlastBufferQueue != null) {
mBlastBufferQueue.setNextTransaction(mRtBLASTSyncTransaction);
}
}
boolean canUseAsync = draw(fullRedrawNeeded);
if (usingAsyncReport && !canUseAsync) {