Bug 1256701 - prevent null pointer dereference |selectedTab| in BrowserApp::enterEditingMode. r=sebastian
authorAndi-Bogdan Postelnicu <bogdan.postelnicu@softvision.ro>
Fri, 18 Mar 2016 11:45:54 +0200
changeset 327217 5371f013cb35fa74d86fd76159c95992e73b459f
parent 327216 f060c3d871fb721cec59b195a8080fc26ff72bd8
child 327218 472e569106be3d4248f51028854c6366ee4140c8
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1256701
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1256701 - prevent null pointer dereference |selectedTab| in BrowserApp::enterEditingMode. r=sebastian MozReview-Commit-ID: CS7i40ErsPJ
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -2319,17 +2319,18 @@ public class BrowserApp extends GeckoApp
 
         final PropertyAnimator animator = new PropertyAnimator(250);
         animator.setUseHardwareLayer(false);
 
         TransitionsTracker.track(animator);
 
         mBrowserToolbar.startEditing(url, animator);
 
-        final boolean isUserSearchTerm = !TextUtils.isEmpty(selectedTab.getUserRequested());
+        final boolean isUserSearchTerm = selectedTab != null &&
+                !TextUtils.isEmpty(selectedTab.getUserRequested());
         if (isUserSearchTerm && SwitchBoard.isInExperiment(getContext(), Experiments.SEARCH_TERM)) {
             showBrowserSearchAfterAnimation(animator);
         } else {
             showHomePagerWithAnimator(panelId, animator);
         }
 
         animator.start();
         Telemetry.startUISession(TelemetryContract.Session.AWESOMESCREEN);