From 99b5e1e9d55cea1ab6c88ad52c6e2d687fdedb5d Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 2 Sep 2019 08:44:21 +0200 Subject: [PATCH] fix NPE --- .../info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.java index 0425190723..d3f6cc8212 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.java @@ -291,7 +291,7 @@ public class LoopPlugin extends PluginBase { Profile profile = ProfileFunctions.getInstance().getProfile(); - if (!ProfileFunctions.getInstance().isProfileValid("Loop")) { + if (profile == null || !ProfileFunctions.getInstance().isProfileValid("Loop")) { if (L.isEnabled(L.APS)) log.debug(MainApp.gs(R.string.noprofileselected)); RxBus.INSTANCE.send(new EventLoopSetLastRunGui(MainApp.gs(R.string.noprofileselected)));