check for null

This commit is contained in:
Milos Kozak 2017-05-03 18:23:33 +02:00
parent 037bb09d23
commit 37edc19509

View file

@ -234,7 +234,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
synchronized (dataLock) {
NSProfile profile = ConfigBuilderPlugin.getActiveProfile() != null ? ConfigBuilderPlugin.getActiveProfile().getProfile() : null;
if (profile == null) {
if (profile == null || profile.getIsf(NSProfile.secondsFromMidnight()) == null || profile.getIc(NSProfile.secondsFromMidnight()) == null) {
log.debug("calculateSensitivityData: No profile available");
return;
}