Closed Bug 774156 Opened 7 years ago Closed 7 years ago

Fix NPE in Tabs when "Don't keep activities" is enabled

Categories

(Firefox for Android :: General, defect)

ARM
Android
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 16
Tracking Status
firefox15 --- verified
firefox16 --- verified
firefox17 --- verified

People

(Reporter: bnicholson, Assigned: bnicholson)

References

Details

Crash Data

Attachments

(1 file)

Attached patch patchSplinter Review
No description provided.
Attachment #642462 - Flags: review?(mark.finkle)
Comment on attachment 642462 [details] [diff] [review]
patch

># HG changeset patch
># Parent c2760174d69844689f2ed95b83bff634c34ce0c2
># User Brian Nicholson <bnicholson@mozilla.com>
>diff --git a/mobile/android/base/Tabs.java b/mobile/android/base/Tabs.java
>--- a/mobile/android/base/Tabs.java
>+++ b/mobile/android/base/Tabs.java
>@@ -96,17 +96,18 @@ public class Tabs implements GeckoEventL
>         // This avoids a NPE below, but callers need to be careful to
>         // handle this case
>         if (tab == null)
>             return null;
> 
>         mSelectedTab = tab;
>         GeckoApp.mAppContext.mMainHandler.post(new Runnable() { 
>             public void run() {
>-                GeckoApp.mAppContext.mFormAssistPopup.hide();
>+                if (GeckoApp.mAppContext.mFormAssistPopup != null)
>+                    GeckoApp.mAppContext.mFormAssistPopup.hide();
>                 if (isSelectedTab(tab)) {
>                     String url = tab.getURL();
>                     notifyListeners(tab, TabEvents.SELECTED);
> 
>                     if (oldTab != null)
>                         notifyListeners(oldTab, TabEvents.UNSELECTED);
>                 }
>             }
Attachment #642462 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/2220334ff2d0
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 16
Duplicate of this bug: 774206
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.gecko.Tabs$2.run(Tabs.java)]
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.