Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit d9ed848

Browse files
authored
Ensure GeckoSession is not null in cleanResources (#3400)
1 parent fe9d2ec commit d9ed848

File tree

1 file changed

+3
-1
lines changed
  • app/src/common/shared/org/mozilla/vrbrowser/browser/engine

1 file changed

+3
-1
lines changed

app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,9 @@ public CompletableFuture<Void> captureBackgroundBitmap(int displayWidth, int dis
609609

610610
Runnable cleanResources = () -> {
611611
display.surfaceDestroyed();
612-
mState.mSession.releaseDisplay(display);
612+
if (mState.mSession != null) {
613+
mState.mSession.releaseDisplay(display);
614+
}
613615
BitmapCache.getInstance(mContext).releaseCaptureSurface();
614616
};
615617

0 commit comments

Comments
 (0)