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))