From b4fe813ed355d16c27a22ef257c6ccafadd5df8a Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Mon, 5 Aug 2019 11:40:38 +0200 Subject: [PATCH] Fix crash restoring sessions (#1497) --- .../org/mozilla/vrbrowser/browser/engine/SessionStack.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/SessionStack.java b/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/SessionStack.java index ad3da4d9b..419cfe61c 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/SessionStack.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/SessionStack.java @@ -291,7 +291,9 @@ public void restore(SessionStack store, int currentSessionId) { state.mSession = new GeckoSession(geckoSettings); } - state.mSession.restoreState(state.mSessionState); + if (state.mSessionState != null) { + state.mSession.restoreState(state.mSessionState); + } int newSessionId = state.mSession.hashCode(); oldNewSessionId.put(entry.getKey(), newSessionId);