From d85425e68bf5b85be2c926d7ce5b9eff135be68d Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Thu, 20 Jul 2017 13:05:44 +0200 Subject: [PATCH] NPE guard. --- .../nightscout/androidaps/plugins/PumpCombo/ComboFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java index 36461835e7..c8564c8b62 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java @@ -109,6 +109,9 @@ public class ComboFragment extends Fragment implements View.OnClickListener { statusText.setText(getPlugin().statusSummary); if (getPlugin().isInitialized()) { PumpState ps = getPlugin().pumpState; + if (ps == null) { + return; + } boolean tbrActive = ps.tbrPercent != -1 && ps.tbrPercent != 100; if (tbrActive) { tbrPercentageText.setText("" + ps.tbrPercent + "%");