1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-16 01:12:08 +01:00

made getAppSettings more safe

This commit is contained in:
vanitasvitae 2016-10-23 00:21:17 +02:00
parent 6cc651bfcc
commit 6ad634cc5b
Signed by: vanitasvitae
GPG key ID: DCCFB3302C9E4615

View file

@ -145,7 +145,11 @@ public class PodSelectionDialog extends ThemedAppCompatDialogFragment {
@Override
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)