check for null
This commit is contained in:
parent
066283a4b0
commit
f1f7a6ca6c
|
@ -183,7 +183,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
|
||||||
profile = MainApp.getConfigBuilder().getProfile();
|
profile = MainApp.getConfigBuilder().getProfile();
|
||||||
profileStore = ConfigBuilderPlugin.getActiveProfileInterface().getProfile();
|
profileStore = ConfigBuilderPlugin.getActiveProfileInterface().getProfile();
|
||||||
ArrayList<CharSequence> profileList;
|
ArrayList<CharSequence> profileList;
|
||||||
units = profile.getUnits();
|
units = profile != null ? profile.getUnits() : Constants.MGDL;
|
||||||
profileList = profileStore.getProfileList();
|
profileList = profileStore.getProfileList();
|
||||||
ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(getContext(),
|
ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(getContext(),
|
||||||
R.layout.spinner_centered, profileList);
|
R.layout.spinner_centered, profileList);
|
||||||
|
|
Loading…
Reference in a new issue