From 5e778f1e76870cc5abce099888bef5466eba2d38 Mon Sep 17 00:00:00 2001 From: TebbeUbben Date: Mon, 9 Mar 2020 23:11:14 +0100 Subject: [PATCH] Fix NullPointerException --- .../androidaps/plugins/pump/insight/InsightAlertService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/InsightAlertService.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/InsightAlertService.java index cd9060338a..53ce3a7d5e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/InsightAlertService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/InsightAlertService.java @@ -237,7 +237,7 @@ public class InsightAlertService extends Service implements InsightConnectionSer stopAlerting(); showNotification(alert); SnoozeAlertMessage snoozeAlertMessage = new SnoozeAlertMessage(); - snoozeAlertMessage.setAlertID(alertLiveData.getValue().getAlertId()); + snoozeAlertMessage.setAlertID(alert.getAlertId()); connectionService.requestMessage(snoozeAlertMessage).await(); } } catch (AppLayerErrorException e) { @@ -262,7 +262,7 @@ public class InsightAlertService extends Service implements InsightConnectionSer alertLiveData.postValue(null); dismissNotification(); ConfirmAlertMessage confirmAlertMessage = new ConfirmAlertMessage(); - confirmAlertMessage.setAlertID(alertLiveData.getValue().getAlertId()); + confirmAlertMessage.setAlertID(alert.getAlertId()); connectionService.requestMessage(confirmAlertMessage).await(); this.alert = null; }