Prevent NPE

This commit is contained in:
topjohnwu 2017-09-16 02:41:24 +08:00
parent b4ecd93f1c
commit a31cddbe7b

View File

@ -258,7 +258,8 @@ public class MagiskFragment extends Fragment
spinner.setEnabled(false); spinner.setEnabled(false);
} else { } else {
items.add(getString(R.string.cannot_auto_detect)); items.add(getString(R.string.cannot_auto_detect));
items.addAll(mm.blockList); if (mm.blockList != null)
items.addAll(mm.blockList);
} }
ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(), ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(),
android.R.layout.simple_spinner_item, items); android.R.layout.simple_spinner_item, items);