From b32a4b3a9c2d1bc9a89659cb0b9b6516bd25dd72 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Thu, 8 Jul 2010 19:42:11 +0000 Subject: [PATCH] fix bug git-svn-id: https://osmand.googlecode.com/svn/trunk@307 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8 --- DataExtractionOSM/src/com/osmand/osm/MapUtils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DataExtractionOSM/src/com/osmand/osm/MapUtils.java b/DataExtractionOSM/src/com/osmand/osm/MapUtils.java index 83c08a83dc..992a69a70a 100644 --- a/DataExtractionOSM/src/com/osmand/osm/MapUtils.java +++ b/DataExtractionOSM/src/com/osmand/osm/MapUtils.java @@ -66,7 +66,11 @@ public class MapUtils { } else if(e instanceof Relation){ List list = new ArrayList(); for(Entity fe : ((Relation) e).getMembers(null)){ - LatLon c = getCenter(fe); + LatLon c = null; + // skip relations to avoid circular dependencies + if(!(fe instanceof Relation)){ + c = getCenter(fe); + } if(c != null){ list.add(c); }