Bug 1474973: Fix NULL_DEREFERENCE errors. r=nalexander
authorRobert Bartlensky <rbartlensky@mozilla.com>
Thu, 12 Jul 2018 10:53:44 +0100
changeset 427125 b3e82720e36c04304b3eee19276b2b802fb51053
parent 427124 dd8b72cfda82d0924dca8a98275ebf82bf80dbdf
child 427126 99ac85a273af610206c5077fed6a5841d9678291
push id66519
push usernerli@mozilla.com
push dateWed, 18 Jul 2018 14:01:26 +0000
treeherderautoland@b3e82720e36c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1474973
milestone63.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 1474973: Fix NULL_DEREFERENCE errors. r=nalexander MozReview-Commit-ID: 8petRuuRGv
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
@@ -1706,17 +1706,17 @@ public class GeckoAppShell
     private static boolean unlockProfile() {
         // Try to kill any zombie Fennec's that might be running
         GeckoAppShell.killAnyZombies();
 
         // Then force unlock this profile
         final GeckoProfile profile = GeckoThread.getActiveProfile();
         if (profile != null) {
             File lock = profile.getFile(".parentlock");
-            return lock.exists() && lock.delete();
+            return lock != null && lock.exists() && lock.delete();
         }
         return false;
     }
 
     @WrapForJNI(calledFrom = "gecko")
     private static String getProxyForURI(String spec, String scheme, String host, int port) {
         final ProxySelector ps = new ProxySelector();