check for NPE

This commit is contained in:
Milos Kozak 2018-06-05 14:35:18 +02:00
parent 151bd0e058
commit 5df51e8a6e

View file

@ -408,9 +408,9 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com
private void initDialog() { private void initDialog() {
Profile profile = MainApp.getConfigBuilder().getProfile(); Profile profile = MainApp.getConfigBuilder().getProfile();
ProfileStore profileStore = MainApp.getConfigBuilder().getActiveProfileInterface().getProfile(); ProfileStore profileStore = MainApp.getConfigBuilder().getActiveProfileInterface() != null ? MainApp.getConfigBuilder().getActiveProfileInterface().getProfile() : null;
if (profile == null) { if (profile == null || profileStore == null) {
ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), MainApp.gs(R.string.noprofile)); ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), MainApp.gs(R.string.noprofile));
dismiss(); dismiss();
return; return;