From 29d4379b844715e72dfb38ba5a55c7019f1ec453 Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Tue, 23 Jun 2020 21:25:20 +0300 Subject: [PATCH] fix --- OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java b/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java index 20812ad931..be12ef4d82 100644 --- a/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java +++ b/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java @@ -87,9 +87,8 @@ public class OsmMapUtils { } public static LatLon getComplexPolyCenter(Collection outer, List> inner) { - if (outer != null && outer.size() <= 5 && inner == null) { + if (!Algorithms.isEmpty(outer) && outer.size() <= 5 && inner == null) { List sub = new ArrayList<>(outer); - return getWeightCenterForNodes(sub.subList(0, sub.size()-1)); }