Bugfix: NPE when refreshing pump status without a profile set.

The base basal rate is a different thing than a TBR rate, when a TBR
is running the PumpStatus has a tbrRate, when no TBR is running
there's no TBR rate, so don't display the base basal rate.
This commit is contained in:
Johannes Mockenhaupt 2017-07-23 14:07:46 +02:00
parent cd22c0d351
commit 9826c1d953
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -118,7 +118,7 @@ public class ComboFragment extends Fragment implements View.OnClickListener {
} else { } else {
tbrPercentageText.setText("Default basal rate running"); tbrPercentageText.setText("Default basal rate running");
tbrDurationText.setText(""); tbrDurationText.setText("");
tbrRateText.setText("" + getPlugin().getBaseBasalRate() + " U/h"); tbrRateText.setText("");
} }
pumpErrorText.setText(ps.errorMsg != null ? ps.errorMsg : ""); pumpErrorText.setText(ps.errorMsg != null ? ps.errorMsg : "");
} }