[GRASS-SVN] r60691 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jun 3 07:44:18 PDT 2014
Author: hcho
Date: 2014-06-03 07:44:18 -0700 (Tue, 03 Jun 2014)
New Revision: 60691
Modified:
grass/trunk/lib/vector/Vlib/level_two.c
Log:
Vect_get_centroid_area(): fix seg fault with no centroid
Modified: grass/trunk/lib/vector/Vlib/level_two.c
===================================================================
--- grass/trunk/lib/vector/Vlib/level_two.c 2014-06-03 13:38:48 UTC (rev 60690)
+++ grass/trunk/lib/vector/Vlib/level_two.c 2014-06-03 14:44:18 UTC (rev 60691)
@@ -437,7 +437,7 @@
check_level(Map);
- if (Map->plus.Line[centroid]->type != GV_CENTROID)
+ if (centroid == 0 || Map->plus.Line[centroid]->type != GV_CENTROID)
return 0;
topo = (struct P_topo_c *)Map->plus.Line[centroid]->topo;
More information about the grass-commit
mailing list