[geos-commits] r2466 - trunk/source/operation

svn_geos at osgeo.org svn_geos at osgeo.org
Mon May 4 19:43:26 EDT 2009


Author: strk
Date: 2009-05-04 19:43:26 -0400 (Mon, 04 May 2009)
New Revision: 2466

Modified:
   trunk/source/operation/IsSimpleOp.cpp
Log:
Fix memory bug 


Modified: trunk/source/operation/IsSimpleOp.cpp
===================================================================
--- trunk/source/operation/IsSimpleOp.cpp	2009-05-04 23:23:10 UTC (rev 2465)
+++ trunk/source/operation/IsSimpleOp.cpp	2009-05-04 23:43:26 UTC (rev 2466)
@@ -239,14 +239,16 @@
 	for (; it!=endPoints.end(); ++it) {
 		EndpointInfo *eiInfo=it->second;
 		if (eiInfo->isClosed && eiInfo->degree!=2) {
+
+			nonSimpleLocation.reset(
+				new Coordinate( eiInfo->getCoordinate() )
+			);
+
 			it=endPoints.begin();
 			for (; it!=endPoints.end(); ++it) {
 				EndpointInfo *ep=it->second;
 				delete ep;
 			}
-			nonSimpleLocation.reset(
-				new Coordinate( eiInfo->getCoordinate() )
-			);
             		return true;
 		}
 	}



More information about the geos-commits mailing list