NPE guard.
This commit is contained in:
parent
d5bf5812b7
commit
d85425e68b
1 changed files with 3 additions and 0 deletions
|
@ -109,6 +109,9 @@ public class ComboFragment extends Fragment implements View.OnClickListener {
|
||||||
statusText.setText(getPlugin().statusSummary);
|
statusText.setText(getPlugin().statusSummary);
|
||||||
if (getPlugin().isInitialized()) {
|
if (getPlugin().isInitialized()) {
|
||||||
PumpState ps = getPlugin().pumpState;
|
PumpState ps = getPlugin().pumpState;
|
||||||
|
if (ps == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
boolean tbrActive = ps.tbrPercent != -1 && ps.tbrPercent != 100;
|
boolean tbrActive = ps.tbrPercent != -1 && ps.tbrPercent != 100;
|
||||||
if (tbrActive) {
|
if (tbrActive) {
|
||||||
tbrPercentageText.setText("" + ps.tbrPercent + "%");
|
tbrPercentageText.setText("" + ps.tbrPercent + "%");
|
||||||
|
|
Loading…
Reference in a new issue