From a1d6834bcebff86b16bd75cbd001550804402d4d Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Fri, 27 Oct 2017 19:39:51 +0200 Subject: [PATCH] KeepAliveReceiver: check pump only if initialized already. --- .../info/nightscout/androidaps/receivers/KeepAliveReceiver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java index 860da1aa65..5b65352501 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java +++ b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java @@ -56,7 +56,7 @@ public class KeepAliveReceiver extends BroadcastReceiver { private void checkPump() { final PumpInterface pump = MainApp.getConfigBuilder(); final Profile profile = MainApp.getConfigBuilder().getProfile(); - if (pump != null && profile != null && profile.getBasal() != null) { + if (pump != null && pump.isInitialized() && profile != null && profile.getBasal() != null) { Date lastConnection = pump.lastDataTime(); boolean isStatusOutdated = lastConnection.getTime() + 15 * 60 * 1000L < System.currentTimeMillis();