[GRASS-SVN] r54090 - grass/trunk/lib/vector/diglib
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Nov 28 08:34:04 PST 2012
Author: martinl
Date: 2012-11-28 08:34:03 -0800 (Wed, 28 Nov 2012)
New Revision: 54090
Modified:
grass/trunk/lib/vector/diglib/plus_area.c
Log:
dig_angle_next_line(): avoid segfault on dead line
Modified: grass/trunk/lib/vector/diglib/plus_area.c
===================================================================
--- grass/trunk/lib/vector/diglib/plus_area.c 2012-11-28 16:24:22 UTC (rev 54089)
+++ grass/trunk/lib/vector/diglib/plus_area.c 2012-11-28 16:34:03 UTC (rev 54090)
@@ -570,7 +570,12 @@
line = abs(Node->lines[next]);
Line = plus->Line[line];
-
+ if (!Line) {
+ G_warning(_("Unable to find next line for %d. Dead line found."),
+ current_line);
+ return 0;
+ }
+
if (Line->type & type) { /* line found */
G_debug(3, " this one");
if (angle)
More information about the grass-commit
mailing list