diff options
| author | 2020-02-15 23:24:49 +0000 | |
|---|---|---|
| committer | 2020-02-15 23:24:49 +0000 | |
| commit | e80f306fdf3008e1c47abb4cc430289220a0102f (patch) | |
| tree | 000bb04c877ca84d00570d20f70ca0d0b1cc36c5 | |
| parent | 7f78246d614ed6d2faba0e4b1813107084c5a901 (diff) | |
| parent | a8fe8429737e86002669a540d4ab5f731f81d8f8 (diff) | |
Merge "Fixing another crash when creating/updating BLASTBufferQueue"
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index b971a20d11c9..688517d86af8 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1705,12 +1705,13 @@ public final class ViewRootImpl implements ViewParent, } Surface getOrCreateBLASTSurface(int width, int height) { - if (mSurfaceControl == null || !mSurfaceControl.isValid()) { + if (mSurfaceControl == null + || !mSurfaceControl.isValid() + || mBlastSurfaceControl == null + || !mBlastSurfaceControl.isValid()) { return null; } - if ((mBlastSurfaceControl != null) - && (mBlastBufferQueue == null) - && mBlastSurfaceControl.isValid()) { + if (mBlastBufferQueue == null) { mBlastBufferQueue = new BLASTBufferQueue( mBlastSurfaceControl, width, height); } |