From e8467ec75fe149c5c6977d7a2d5efff7085509f0 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 8 Sep 2016 16:53:48 +0200 Subject: [PATCH] check for null --- .../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 7753fcdcf5..1ab627fd33 100644 --- a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java +++ b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java @@ -40,7 +40,7 @@ public class KeepAliveReceiver extends BroadcastReceiver { log.debug("KeepAlive received"); final DanaRPlugin danaRPlugin = (DanaRPlugin) MainApp.getSpecificPlugin(DanaRPlugin.class); - if (Config.DANAR && danaRPlugin.isEnabled(PluginBase.PUMP)) { + if (danaRPlugin != null && Config.DANAR && danaRPlugin.isEnabled(PluginBase.PUMP)) { if (danaRPlugin.getDanaRPump().lastConnection.getTime() + 30 * 60 * 1000L < new Date().getTime() && !danaRPlugin.isConnected() && !danaRPlugin.isConnecting()) { Thread t = new Thread(new Runnable() { @Override