[MOAB-dev] r5583 - MOAB/trunk/tools/dagmc
sjackson at cae.wisc.edu
sjackson at cae.wisc.edu
Mon Jun 18 13:51:44 CDT 2012
Author: sjackson
Date: 2012-06-18 13:51:44 -0500 (Mon, 18 Jun 2012)
New Revision: 5583
Modified:
MOAB/trunk/tools/dagmc/DagMC.cpp
Log:
Fix an issue with DagMC properties.
Avoid a segfault when a group name specifies a property that the
caller of parse_properties did not request access to.
Modified: MOAB/trunk/tools/dagmc/DagMC.cpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.cpp 2012-06-18 06:38:24 UTC (rev 5582)
+++ MOAB/trunk/tools/dagmc/DagMC.cpp 2012-06-18 18:51:44 UTC (rev 5583)
@@ -1744,10 +1744,11 @@
std::string groupkey = (*i).first;
std::string groupval = (*i).second;
- Tag proptag = property_tagmap[(*i).first];
- rval = MBI->tag_clear_data( proptag, grp_sets, groupval.c_str(), groupval.length()+1 );
+ if( property_tagmap.find( groupkey ) != property_tagmap.end() ){
+ Tag proptag = property_tagmap[groupkey];
+ rval = MBI->tag_clear_data( proptag, grp_sets, groupval.c_str(), groupval.length()+1 );
+ }
}
-
}
return MB_SUCCESS;
}
More information about the moab-dev
mailing list