From 27bfab5e154143d99ff9426c87394ee4cf525585 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 8 Aug 2018 00:41:31 +0200 Subject: [PATCH] fix NPE --- .../androidaps/plugins/XDripStatusline/StatuslinePlugin.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/XDripStatusline/StatuslinePlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/XDripStatusline/StatuslinePlugin.java index f11d5c05b9..9c4ec1551a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/XDripStatusline/StatuslinePlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/XDripStatusline/StatuslinePlugin.java @@ -9,6 +9,7 @@ import android.support.annotation.NonNull; import com.squareup.otto.Subscribe; +import info.nightscout.androidaps.Config; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; import info.nightscout.androidaps.data.IobTotal; @@ -113,6 +114,10 @@ public class StatuslinePlugin extends PluginBase { @NonNull private String buildStatusString(Profile profile) { String status = ""; + + if (ConfigBuilderPlugin.getPlugin().getActivePump() == null) + return ""; + LoopPlugin loopPlugin = LoopPlugin.getPlugin(); if (!loopPlugin.isEnabled(PluginType.LOOP)) {