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