[geos-commits] r3411 - trunk/src/geomgraph
svn_geos at osgeo.org
svn_geos at osgeo.org
Tue Jul 5 05:52:06 EDT 2011
Author: strk
Date: 2011-07-05 02:52:06 -0700 (Tue, 05 Jul 2011)
New Revision: 3411
Modified:
trunk/src/geomgraph/Node.cpp
Log:
Avoid segfaulting when Node.setLabelBoundary is called against a node with null label. See https://sourceforge.net/tracker/?func=detail&aid=3353871&group_id=128875&atid=713120
Modified: trunk/src/geomgraph/Node.cpp
===================================================================
--- trunk/src/geomgraph/Node.cpp 2011-07-05 09:52:00 UTC (rev 3410)
+++ trunk/src/geomgraph/Node.cpp 2011-07-05 09:52:06 UTC (rev 3411)
@@ -192,9 +192,10 @@
void
Node::setLabelBoundary(int argIndex)
{
- int loc=Location::UNDEF;
- if (label!=NULL)
- loc=label->getLocation(argIndex);
+ // See https://sourceforge.net/tracker/?func=detail&aid=3353871&group_id=128875&atid=713120
+ if (label == NULL) return;
+
+ int loc = label->getLocation(argIndex);
// flip the loc
int newLoc;
switch (loc){
More information about the geos-commits
mailing list