commit 23368864334e6835bc320805b2fe183da455f36b Author: n8fr8 nathan@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); }