mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 12:22:08 +01:00
made getAppSettings more safe
This commit is contained in:
parent
6cc651bfcc
commit
6ad634cc5b
1 changed files with 5 additions and 1 deletions
|
@ -145,7 +145,11 @@ public class PodSelectionDialog extends ThemedAppCompatDialogFragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected AppSettings getAppSettings() {
|
protected AppSettings getAppSettings() {
|
||||||
return app.getSettings();
|
if(isAdded()) {
|
||||||
|
return ((App) getActivity().getApplication()).getSettings();
|
||||||
|
} else {
|
||||||
|
return new AppSettings(getContext().getApplicationContext());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnItemSelected(R.id.podselection__dialog__spinner_profile)
|
@OnItemSelected(R.id.podselection__dialog__spinner_profile)
|
||||||
|
|
Loading…
Reference in a new issue