From 2f235385e0cae1becbfe307bf3dc0fb28c8b99fd Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Mon, 4 Dec 2017 20:04:58 +0100 Subject: [PATCH] fix NPE --- .../plugins/Wear/wearintegration/WatchUpdaterService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java index cbf2fc9ae2..7acdd15d72 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/wearintegration/WatchUpdaterService.java @@ -552,7 +552,7 @@ public class WatchUpdaterService extends WearableListenerService implements //OpenAPS status if(Config.APS){ //we are AndroidAPS - openApsStatus = LoopPlugin.lastRun.lastEnact != null && LoopPlugin.lastRun.lastEnact.getTime() != 0 ? LoopPlugin.lastRun.lastEnact.getTime(): -1; + openApsStatus = LoopPlugin.lastRun != null && LoopPlugin.lastRun.lastEnact != null && LoopPlugin.lastRun.lastEnact.getTime() != 0 ? LoopPlugin.lastRun.lastEnact.getTime(): -1; } else { //NSClient or remote openApsStatus = NSDeviceStatus.getOpenApsTimestamp();