check for NPE
This commit is contained in:
parent
e8b46e7880
commit
a076b00363
1 changed files with 4 additions and 0 deletions
|
@ -496,6 +496,10 @@ public class IobCobCalculatorPlugin extends PluginBase {
|
||||||
log.debug("AUTOSENSDATA null: Exception catched (" + reason + ")");
|
log.debug("AUTOSENSDATA null: Exception catched (" + reason + ")");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
if (data == null) {
|
||||||
|
log.debug("AUTOSENSDATA null: data==null");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (data.time < System.currentTimeMillis() - 11 * 60 * 1000) {
|
if (data.time < System.currentTimeMillis() - 11 * 60 * 1000) {
|
||||||
if (L.isEnabled(L.AUTOSENS))
|
if (L.isEnabled(L.AUTOSENS))
|
||||||
log.debug("AUTOSENSDATA null: data is old (" + reason + ") size()=" + autosensDataTable.size() + " lastdata=" + DateUtil.dateAndTimeString(data.time));
|
log.debug("AUTOSENSDATA null: data is old (" + reason + ") size()=" + autosensDataTable.size() + " lastdata=" + DateUtil.dateAndTimeString(data.time));
|
||||||
|
|
Loading…
Reference in a new issue