From 22e03d65da2c8c3f8fa7973a89359ab1a956dea4 Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Mon, 30 Apr 2018 08:01:46 +0200 Subject: [PATCH] Fix DevicesAdapter NullPtr exception (#1075) --- .../java/com/nutomic/syncthingandroid/views/DevicesAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/nutomic/syncthingandroid/views/DevicesAdapter.java b/app/src/main/java/com/nutomic/syncthingandroid/views/DevicesAdapter.java index 263885e9..c531efeb 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/views/DevicesAdapter.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/views/DevicesAdapter.java @@ -47,7 +47,7 @@ public class DevicesAdapter extends ArrayAdapter { Resources r = getContext().getResources(); Connections.Connection conn = null; - if (mConnections != null || mConnections.connections.containsKey(deviceId)) { + if (mConnections != null && mConnections.connections.containsKey(deviceId)) { conn = mConnections.connections.get(deviceId); }