X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=osm.c;h=a9c499e69152183d7d2545162a770f9f15535d59;hb=0f3504cdb01d0a0a1e9151013c3ff83a61a0b28b;hp=862f7fbb52012cdcf76221a15879cdc60beace04;hpb=69501dc691564f350581115ee49d61ef39858e62;p=leo.git diff --git a/osm.c b/osm.c index 862f7fb..a9c499e 100644 --- a/osm.c +++ b/osm.c @@ -382,7 +382,7 @@ static void mpg_walk_boundary(struct osm_multipolygon *m, bool inner) clist_init(&b->nodes); struct mpg_vertex *w = v; - while (!w->visited) + while (w && !w->visited) { w->visited = 1; struct osm_ref *f = mp_alloc(osm_this->pool, sizeof(*f)); @@ -412,7 +412,9 @@ static void mpg_walk_boundary(struct osm_multipolygon *m, bool inner) w = dest; } - if (w != v) + if (!w) + osm_obj_warn(&mpg_current->o, "Boundary not closed"); + else if (w != v) osm_obj_warn(&mpg_current->o, "Boundary not closed at node %ju", (uintmax_t) w->o->id); struct osm_ref *f = mp_alloc(osm_this->pool, sizeof(*f));