From 2c21571cf4b51380ba44a0c7b2b1cb529a3516f2 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 11 Mar 2018 16:38:30 +0100 Subject: [PATCH] fix NPE --- app/src/main/java/info/nightscout/androidaps/data/Profile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/data/Profile.java b/app/src/main/java/info/nightscout/androidaps/data/Profile.java index 2cb3dd3f62..5c6d4c9629 100644 --- a/app/src/main/java/info/nightscout/androidaps/data/Profile.java +++ b/app/src/main/java/info/nightscout/androidaps/data/Profile.java @@ -219,7 +219,7 @@ public class Profile { if (isValid) { // Check for hours alignment PumpInterface pump = MainApp.getConfigBuilder().getActivePump(); - if (!pump.getPumpDescription().is30minBasalRatesCapable) { + if (pump != null && !pump.getPumpDescription().is30minBasalRatesCapable) { for (int index = 0; index < basal_v.size(); index++) { long secondsFromMidnight = basal_v.keyAt(index); if (secondsFromMidnight % 3600 != 0) {