From 54b1018b36c4c7f97016cb901372da2cdd496577 Mon Sep 17 00:00:00 2001 From: "Randall E. Barker" Date: Wed, 20 May 2020 15:56:22 -0700 Subject: [PATCH] Ensure GeckoSession is not null in cleanResources --- .../shared/org/mozilla/vrbrowser/browser/engine/Session.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java b/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java index ff78a2c48..8d9d2fd12 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java @@ -609,7 +609,9 @@ public CompletableFuture captureBackgroundBitmap(int displayWidth, int dis Runnable cleanResources = () -> { display.surfaceDestroyed(); - mState.mSession.releaseDisplay(display); + if (mState.mSession != null) { + mState.mSession.releaseDisplay(display); + } BitmapCache.getInstance(mContext).releaseCaptureSurface(); };