Merge pull request #1221 from mfietz/issue/1220-preference-controller-NPE
Fix PreferenceActivity NPE
This commit is contained in:
commit
5e458ec305
|
@ -102,13 +102,17 @@ public class PreferenceActivity extends ActionBarActivity {
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
addPreferencesFromResource(R.xml.preferences);
|
addPreferencesFromResource(R.xml.preferences);
|
||||||
|
if(instance.preferenceController != null) {
|
||||||
instance.preferenceController.onCreate();
|
instance.preferenceController.onCreate();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
if(instance.preferenceController != null) {
|
||||||
instance.preferenceController.onResume();
|
instance.preferenceController.onResume();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue