From a31cddbe7bf6ca0802c337561225d075ad928d32 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 16 Sep 2017 02:41:24 +0800 Subject: [PATCH] Prevent NPE --- app/src/main/java/com/topjohnwu/magisk/MagiskFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/MagiskFragment.java b/app/src/main/java/com/topjohnwu/magisk/MagiskFragment.java index 8e9bf8bad..19921fee0 100644 --- a/app/src/main/java/com/topjohnwu/magisk/MagiskFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/MagiskFragment.java @@ -258,7 +258,8 @@ public class MagiskFragment extends Fragment spinner.setEnabled(false); } else { items.add(getString(R.string.cannot_auto_detect)); - items.addAll(mm.blockList); + if (mm.blockList != null) + items.addAll(mm.blockList); } ArrayAdapter adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_spinner_item, items);