[tbb-commits] [tor-browser/tor-browser-52.7.2esr-8.0-1] addresses #9 to handle NPE on Distribution load

gk at torproject.org gk at torproject.org
Tue Mar 20 11:26:34 UTC 2018


commit 23368864334e6835bc320805b2fe183da455f36b
Author: n8fr8 <nathan at freitas.net>
Date:   Sun Aug 6 22:29:10 2017 -0400

    addresses #9 to handle NPE on Distribution load
---
 .../android/base/java/org/mozilla/gecko/distribution/Distribution.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java b/mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java
index 4b272109a0fc..3b69a983c153 100644
--- a/mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java
+++ b/mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java
@@ -229,7 +229,8 @@ public class Distribution {
                     String preferencesJSON = "";
                     try {
                         final File descFile = distribution.getDistributionFile("preferences.json");
-                        preferencesJSON = FileUtils.readStringFromFile(descFile);
+			if (descFile != null)
+                        	preferencesJSON = FileUtils.readStringFromFile(descFile);
                     } catch (IOException e) {
                         Log.e(LOGTAG, "Error getting distribution descriptor file.", e);
                     }





More information about the tbb-commits mailing list