diff options
author | Scott Jackson <daneren2005@gmail.com> | 2016-01-04 17:05:01 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2016-01-04 17:05:01 -0800 |
commit | 3e341f4220d71b6d0abda0d0b4eed81538bd9293 (patch) | |
tree | 3708c1c6af40ca5599d79f2720d770ee06529bc5 /app | |
parent | efdb68d9ca8623f5e2c744ae63e626891861c52b (diff) | |
download | dsub-3e341f4220d71b6d0abda0d0b4eed81538bd9293.tar.gz dsub-3e341f4220d71b6d0abda0d0b4eed81538bd9293.tar.bz2 dsub-3e341f4220d71b6d0abda0d0b4eed81538bd9293.zip |
Fix crash when auto resetting the cache location
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java | 7 |
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. |