From 401a4c2cc1ba59e7a494a430cb6c25f097a8a9af Mon Sep 17 00:00:00 2001 From: Andy Carra Date: Tue, 18 Jun 2024 19:05:43 -0700 Subject: [PATCH] pretty weird case --- .../wigle/wigleandroid/DBResultActivity.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/wiglewifiwardriving/src/main/java/net/wigle/wigleandroid/DBResultActivity.java b/wiglewifiwardriving/src/main/java/net/wigle/wigleandroid/DBResultActivity.java index fc857d8c9..f474e38f4 100644 --- a/wiglewifiwardriving/src/main/java/net/wigle/wigleandroid/DBResultActivity.java +++ b/wiglewifiwardriving/src/main/java/net/wigle/wigleandroid/DBResultActivity.java @@ -311,14 +311,16 @@ public void complete() { stopAnimation(); LatLngBounds.Builder builder = new LatLngBounds.Builder(); boolean hasValidPoints = false; - for (Network n : resultList) { - listAdapter.add(n); - mapRender.addItem(n); - final LatLng ll = n.getPosition(); - //noinspection ConstantConditions - if (ll != null) { - builder.include(ll); - hasValidPoints = true; + if (null != mapRender) { + for (Network n : resultList) { + listAdapter.add(n); + mapRender.addItem(n); + final LatLng ll = n.getPosition(); + //noinspection ConstantConditions + if (ll != null) { + builder.include(ll); + hasValidPoints = true; + } } } if (hasValidPoints) {