From 8c9aab66e3b761e23c746361e1e0d51bc30d5ceb Mon Sep 17 00:00:00 2001 From: Dylan Roeh Date: Wed, 16 Nov 2016 09:07:27 -0600 Subject: [PATCH] Bug 1317198 - Check if a tab is null before trying to get its id in GeckoApp.onPause() r=sebastian --- mobile/android/base/java/org/mozilla/gecko/GeckoApp.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java index 99d26752479f..fd88f72226e3 100644 --- a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java @@ -2156,7 +2156,10 @@ public abstract class GeckoApp return; } - lastSelectedTabId = Tabs.getInstance().getSelectedTab().getId(); + final Tab selectedTab = Tabs.getInstance().getSelectedTab(); + if (selectedTab != null) { + lastSelectedTabId = selectedTab.getId(); + } lastActiveGeckoApp = new WeakReference(this); final HealthRecorder rec = mHealthRecorder;