[geos-commits] r3400 - branches/3.3/src/util

svn_geos at osgeo.org svn_geos at osgeo.org
Tue Jul 5 05:43:01 EDT 2011


Author: strk
Date: 2011-07-05 02:43:01 -0700 (Tue, 05 Jul 2011)
New Revision: 3400

Modified:
   branches/3.3/src/util/Profiler.cpp
Log:
Do not dereference past-the-end iterator on invalid call


Modified: branches/3.3/src/util/Profiler.cpp
===================================================================
--- branches/3.3/src/util/Profiler.cpp	2011-07-01 09:02:54 UTC (rev 3399)
+++ branches/3.3/src/util/Profiler.cpp	2011-07-05 09:43:01 UTC (rev 3400)
@@ -115,8 +115,10 @@
 Profiler::stop(string name)
 {
 	map<string, Profile *>::iterator iter = profs.find(name);
-	if ( iter == profs.end() )
+	if ( iter == profs.end() ) {
 		cerr<<name<<": no such Profile started";
+		return;
+	}
 	iter->second->stop();
 }
 



More information about the geos-commits mailing list