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)); }