[MOAB-dev] r3661 - MOAB/trunk/src/parallel

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu Mar 18 10:24:46 CDT 2010


Author: kraftche
Date: 2010-03-18 10:24:46 -0500 (Thu, 18 Mar 2010)
New Revision: 3661

Modified:
   MOAB/trunk/src/parallel/ParallelComm.cpp
Log:
fix use of uninitialized value and possible get from empty range

Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp	2010-03-18 14:55:20 UTC (rev 3660)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp	2010-03-18 15:24:46 UTC (rev 3661)
@@ -2733,9 +2733,10 @@
 
     // resolve dim is maximal dim of entities in proc_ents
   if (-1 == resolve_dim) {
+    if (proc_ents.empty()) 
+      return MB_ENTITY_NOT_FOUND;
+
     resolve_dim = mbImpl->dimension_from_handle(*proc_ents.rbegin()); 
-    RRA("Couldn't get dimension.");
-    
   }
 
     // proc_ents should all be of same dimension



More information about the moab-dev mailing list