[cgma-dev] r3835 - cgm/trunk/itaps

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Mon May 3 15:36:29 CDT 2010


Author: kraftche
Date: 2010-05-03 15:36:29 -0500 (Mon, 03 May 2010)
New Revision: 3835

Modified:
   cgm/trunk/itaps/iGeom_CGMA.cc
Log:
don't segfault on if passed invalid args

Modified: cgm/trunk/itaps/iGeom_CGMA.cc
===================================================================
--- cgm/trunk/itaps/iGeom_CGMA.cc	2010-05-03 17:59:53 UTC (rev 3834)
+++ cgm/trunk/itaps/iGeom_CGMA.cc	2010-05-03 20:36:29 UTC (rev 3835)
@@ -6008,6 +6008,9 @@
                    int gentity_handles_size,
                    int* err) 
 {
+  if (gentity_handles_size < 1) // GMT::imprint segfaults if passed an empty list
+    RETURN(iBase_SUCCESS);
+
   DLIList<Body*> bods;
   DLIList<RefVolume*> vols, temp_vols;
   RefEntity* const* handle_array = ENTITY_HANDLE_CONST_ARRAY(gentity_handles);







































More information about the cgma-dev mailing list