From 181338e9e2e66496081556c6b93d25cb9d978aa3 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 20 Dec 2017 00:04:14 +0100 Subject: [PATCH] Another NPE check for failure scenarios. --- .../nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java index d7d733e036..5a565a5645 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboPlugin.java @@ -804,6 +804,8 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf } private void checkForUnsafeUsage(CommandResult commandResult) { + if (commandResult == null) return; + long lastViolation = 0; if (commandResult.state.unsafeUsageDetected) { lastViolation = System.currentTimeMillis();