[geos-commits] r3409 - trunk/src/util
svn_geos at osgeo.org
svn_geos at osgeo.org
Tue Jul 5 05:51:53 EDT 2011
Author: strk
Date: 2011-07-05 02:51:53 -0700 (Tue, 05 Jul 2011)
New Revision: 3409
Modified:
trunk/src/util/Profiler.cpp
Log:
Do not dereference past-the-end iterator on invalid call
Modified: trunk/src/util/Profiler.cpp
===================================================================
--- trunk/src/util/Profiler.cpp 2011-07-05 09:44:29 UTC (rev 3408)
+++ trunk/src/util/Profiler.cpp 2011-07-05 09:51:53 UTC (rev 3409)
@@ -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