fix null pointer exception in persistentnotification

This commit is contained in:
Milos Kozak 2017-02-09 16:23:28 +01:00
parent 7f123e4208
commit 3d3e849d8a

View file

@ -113,7 +113,6 @@ public class PersistentNotificationPlugin implements PluginBase{
if(profile != null && lastBG != null) { if(profile != null && lastBG != null) {
line1 = lastBG.valueToUnitsToString(profile.getUnits()); line1 = lastBG.valueToUnitsToString(profile.getUnits());
}
if (glucoseStatus != null) { if (glucoseStatus != null) {
line1 += " Δ" + deltastring(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, profile.getUnits()) line1 += " Δ" + deltastring(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, profile.getUnits())
+ " avgΔ" + deltastring(glucoseStatus.avgdelta, glucoseStatus.avgdelta * Constants.MGDL_TO_MMOLL, profile.getUnits()); + " avgΔ" + deltastring(glucoseStatus.avgdelta, glucoseStatus.avgdelta * Constants.MGDL_TO_MMOLL, profile.getUnits());
@ -122,6 +121,7 @@ public class PersistentNotificationPlugin implements PluginBase{
ctx.getString(R.string.old_data) + ctx.getString(R.string.old_data) +
" "; " ";
} }
}
PumpInterface pump = MainApp.getConfigBuilder(); PumpInterface pump = MainApp.getConfigBuilder();