Fixed crash when opening settings for the first time.

This commit is contained in:
Felix Ableitner 2014-05-09 20:14:47 +02:00
parent e745270f56
commit 6517b5002b

View file

@ -106,7 +106,7 @@ public class PreferencesActivity extends PreferenceActivity
* Updates summary of list preference (from current item).
*/
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
if (key.equals(KEY_ENABLE_WIFI_ON_START)) {
if (key.equals(KEY_ENABLE_WIFI_ON_START) && mEnableWifiOnStart != null) {
mEnableWifiOnStart.setSummary(mEnableWifiOnStart.getEntry());
}
}