more checking for null

This commit is contained in:
Milos Kozak 2017-04-22 11:27:56 +02:00
parent 1f2967e866
commit 1a76809f33
2 changed files with 2 additions and 2 deletions

View file

@ -120,7 +120,7 @@ public class NSProfile {
e.printStackTrace(); e.printStackTrace();
} }
} }
return 3D; return Constants.defaultDIA;
} }
/* /*
public Double getCarbAbsorbtionRate() { public Double getCarbAbsorbtionRate() {

View file

@ -142,7 +142,7 @@ public class OpenAPSAMAPlugin implements PluginBase, APSInterface {
return; return;
} }
if (profile == null) { if (profile == null || profile.getIc(NSProfile.secondsFromMidnight()) == null || profile.getIsf(NSProfile.secondsFromMidnight()) == null || profile.getBasal(NSProfile.secondsFromMidnight()) == null ) {
MainApp.bus().post(new EventOpenAPSUpdateResultGui(MainApp.instance().getString(R.string.openapsma_noprofile))); MainApp.bus().post(new EventOpenAPSUpdateResultGui(MainApp.instance().getString(R.string.openapsma_noprofile)));
if (Config.logAPSResult) if (Config.logAPSResult)
log.debug(MainApp.instance().getString(R.string.openapsma_noprofile)); log.debug(MainApp.instance().getString(R.string.openapsma_noprofile));