[geos-commits] r3412 - trunk/src/geomgraph
svn_geos at osgeo.org
svn_geos at osgeo.org
Tue Jul 5 05:52:12 EDT 2011
Author: strk
Date: 2011-07-05 02:52:12 -0700 (Tue, 05 Jul 2011)
New Revision: 3412
Modified:
trunk/src/geomgraph/GeometryGraph.cpp
Log:
Avoid segfalting when an added node has no label in GeometryGraph::insertBoundaryPoint. See https://sourceforge.net/tracker/?func=detail&aid=3353879&group_id=128875&atid=713120
Modified: trunk/src/geomgraph/GeometryGraph.cpp
===================================================================
--- trunk/src/geomgraph/GeometryGraph.cpp 2011-07-05 09:52:06 UTC (rev 3411)
+++ trunk/src/geomgraph/GeometryGraph.cpp 2011-07-05 09:52:12 UTC (rev 3412)
@@ -422,9 +422,11 @@
// the new point to insert is on a boundary
int boundaryCount=1;
+
// determine the current location for the point (if any)
- int loc=Location::UNDEF;
- if (lbl!=NULL) loc=lbl->getLocation(argIndex,Position::ON);
+ if ( NULL == lbl ) return;
+
+ int loc = lbl->getLocation(argIndex,Position::ON);
if (loc==Location::BOUNDARY) boundaryCount++;
// determine the boundary status of the point according to the
More information about the geos-commits
mailing list