fix NPE
This commit is contained in:
parent
d4d194f7f0
commit
ef16174e5b
|
@ -78,12 +78,14 @@ public class OpenAPSSMBPlugin implements PluginBase, APSInterface {
|
|||
|
||||
@Override
|
||||
public boolean isEnabled(int type) {
|
||||
return type == APS && fragmentEnabled && ConfigBuilderPlugin.getActivePump().getPumpDescription().isTempBasalCapable;
|
||||
boolean pumpCapable = ConfigBuilderPlugin.getActivePump() == null || ConfigBuilderPlugin.getActivePump().getPumpDescription().isTempBasalCapable;
|
||||
return type == APS && fragmentEnabled && pumpCapable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisibleInTabs(int type) {
|
||||
return type == APS && fragmentVisible && ConfigBuilderPlugin.getActivePump().getPumpDescription().isTempBasalCapable;
|
||||
boolean pumpCapable = ConfigBuilderPlugin.getActivePump() == null || ConfigBuilderPlugin.getActivePump().getPumpDescription().isTempBasalCapable;
|
||||
return type == APS && fragmentVisible && pumpCapable;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue