aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2016-01-04 17:05:01 -0800
committerScott Jackson <daneren2005@gmail.com>2016-01-04 17:05:01 -0800
commit3e341f4220d71b6d0abda0d0b4eed81538bd9293 (patch)
tree3708c1c6af40ca5599d79f2720d770ee06529bc5 /app/src/main/java/github
parentefdb68d9ca8623f5e2c744ae63e626891861c52b (diff)
downloaddsub-3e341f4220d71b6d0abda0d0b4eed81538bd9293.tar.gz
dsub-3e341f4220d71b6d0abda0d0b4eed81538bd9293.tar.bz2
dsub-3e341f4220d71b6d0abda0d0b4eed81538bd9293.zip
Fix crash when auto resetting the cache location
Diffstat (limited to 'app/src/main/java/github')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java
index 9853e046..11de6aee 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java
@@ -664,8 +664,11 @@ public class SettingsFragment extends PreferenceCompatFragment implements Shared
SharedPreferences.Editor editor = prefs.edit();
editor.putString(Constants.PREFERENCES_KEY_CACHE_LOCATION, defaultPath);
editor.commit();
- cacheLocation.setSummary(defaultPath);
- cacheLocation.setText(defaultPath);
+
+ if(cacheLocation != null) {
+ cacheLocation.setSummary(defaultPath);
+ cacheLocation.setText(defaultPath);
+ }
}
// Clear download queue.