From ca27843dd75b9087ac85dddd9022fffd74eec788 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 31 Oct 2018 08:02:16 +0100 Subject: [PATCH] fix NPE --- .../info/nightscout/androidaps/plugins/Loop/APSResult.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Loop/APSResult.java b/app/src/main/java/info/nightscout/androidaps/plugins/Loop/APSResult.java index 5135c6b87b..3678617c96 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Loop/APSResult.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Loop/APSResult.java @@ -307,6 +307,11 @@ public class APSResult { PumpInterface pump = ConfigBuilderPlugin.getPlugin().getActivePump(); Profile profile = ProfileFunctions.getInstance().getProfile(); + if (profile == null) { + log.error("FALSE: No Profile"); + return false; + } + if (usePercent) { if (activeTemp == null && percent == 100) { if (L.isEnabled(L.APS))