Salome HOME
Mantis issue 0020768: Some Dump with RestoreSubShapes not loadable. Fix 1.
authorjfa <jfa@opencascade.com>
Thu, 18 Mar 2010 13:48:26 +0000 (13:48 +0000)
committerjfa <jfa@opencascade.com>
Thu, 18 Mar 2010 13:48:26 +0000 (13:48 +0000)
src/GEOM_I/GEOM_Gen_i.cc

index 64c78fccba296e2da038dbbaad6fee845b46920c..cbc8935793d884ab8ae6ccbb5a1f2eed60376abc 100644 (file)
@@ -792,7 +792,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesO (SALOMEDS::Study_ptr     theStudy,
 
   aParts = RestoreSubShapes(theStudy, theObject, aSO, theArgs,
                             theFindMethod, theInheritFirstArg, theAddPrefix);
-  aSO->Destroy();
+  if (!CORBA::is_nil(aSO)) aSO->Destroy();
   return aParts._retn();
 }