added null check for stripes #8
This commit is contained in:
@@ -62,6 +62,7 @@ public class AddProfileDialog extends DialogFragment implements DialogInterface.
|
||||
mStripes = ((ColorActivity) getActivity()).getStripes();
|
||||
mCheckboxes = new ArrayList<>();
|
||||
|
||||
if (mStripes != null) {
|
||||
for (LedStripe ledStripe : mStripes) {
|
||||
CheckBox nC = (CheckBox) View.inflate(getActivity(), R.layout.fragment_addprofile_item, null);
|
||||
|
||||
@@ -69,6 +70,7 @@ public class AddProfileDialog extends DialogFragment implements DialogInterface.
|
||||
mCheckboxes.add(nC);
|
||||
checkboxContainer.addView(nC);
|
||||
}
|
||||
}
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
builder.setView(v).setPositiveButton("Save", null).setNegativeButton("Cancel", null);
|
||||
|
Reference in New Issue
Block a user