X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=osm.c;h=a9c499e69152183d7d2545162a770f9f15535d59;hb=c343d14479295d517ae64ccee5a7e83d3ce0fc42;hp=862f7fbb52012cdcf76221a15879cdc60beace04;hpb=9e0796f5be17bd5e65c31865cac25d38c8b2a0fb;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));