Ver código fonte

d.vect: skip invalid areas

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@51018 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 anos atrás
pai
commit
a9873f84e6
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      display/d.vect/area.c

+ 4 - 0
display/d.vect/area.c

@@ -130,6 +130,10 @@ int display_area(struct Map_info *Map, struct cat_list *Clist, const struct Cell
 	/* fill */
 	Vect_get_area_points(Map, area, APoints);
 	G_debug(3, "\tn_points = %d", APoints->n_points);
+	if (APoints->n_points < 3) {
+	    G_warning(_("Invalid area %d skipped"), area);
+	    continue;
+	}
 	Vect_reset_line(Points);
 	Vect_append_points(Points, APoints, GV_FORWARD);