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