From 26a24d384ee4eb7ebaccef609a8e889dadafef78 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 12 Aug 2018 08:53:57 +0200 Subject: [PATCH] fix NPE --- .../androidaps/plugins/Source/SourceNSClientPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Source/SourceNSClientPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Source/SourceNSClientPlugin.java index eb901ca1b7..50ad9e0984 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Source/SourceNSClientPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Source/SourceNSClientPlugin.java @@ -96,7 +96,7 @@ public class SourceNSClientPlugin extends PluginBase implements BgSourceInterfac NSSgv nsSgv = new NSSgv(sgvJson); BgReading bgReading = new BgReading(nsSgv); MainApp.getDbHelper().createIfNotExists(bgReading, "NS"); - SourceNSClientPlugin.getPlugin().detectSource(JsonHelper.safeGetString(sgvJson, "device"), JsonHelper.safeGetLong(sgvJson, "mills")); + SourceNSClientPlugin.getPlugin().detectSource(JsonHelper.safeGetString(sgvJson, "device", "none"), JsonHelper.safeGetLong(sgvJson, "mills")); } public void detectSource(String source, long timeStamp) {