diff --git a/.idea/misc.xml b/.idea/misc.xml
index 5d19981032..fbb68289f4 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -37,7 +37,7 @@
-
+
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/VirtualPump/VirtualPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/VirtualPump/VirtualPumpPlugin.java
index 35ed24d71f..805ddad431 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/VirtualPump/VirtualPumpPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/VirtualPump/VirtualPumpPlugin.java
@@ -333,10 +333,11 @@ public class VirtualPumpPlugin implements PluginBase, PumpInterface {
try {
battery.put("percent", batteryPercent);
status.put("status", "normal");
- if (isTempBasalInProgress()) {
- status.put("tempbasalpct", getTempBasal().percent);
- status.put("tempbasalstart", DateUtil.toISOString(getTempBasal().timeStart));
- status.put("tempbasalremainmin", getTempBasal().getPlannedRemainingMinutes());
+ TempBasal tb;
+ if ((tb = getTempBasal()) != null) {
+ status.put("tempbasalpct", tb.percent);
+ status.put("tempbasalstart", DateUtil.toISOString(tb.timeStart));
+ status.put("tempbasalremainmin", tb.getPlannedRemainingMinutes());
}
status.put("timestamp", DateUtil.toISOString(new Date()));