diff options
| author | 2020-04-20 12:48:19 -0700 | |
|---|---|---|
| committer | 2020-04-20 12:48:19 -0700 | |
| commit | ab581a4c04adc88b178f754c20c1915d73e204d1 (patch) | |
| tree | 4976f42c29dadc90aa28bb035c3d30fc6a71e1c4 | |
| parent | ae4605eee80c26091164d2979d47a69501239edb (diff) | |
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
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index ed1edc3bd526..bcfc8c34231c 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -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) { |