]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix for the Bug IPAL22042 TC5.1.5: File - Exit can not stop application execution.
authorrnv <rnv@opencascade.com>
Thu, 7 Oct 2010 06:40:27 +0000 (06:40 +0000)
committerrnv <rnv@opencascade.com>
Thu, 7 Oct 2010 06:40:27 +0000 (06:40 +0000)
src/GEOM/GEOM_Engine.cxx

index b0ea5a0c2dd3c1ebe149ffba50dc8b63f4cb03ee..d33196f76e5e6e7ce52682ecd005f556251f4ab3 100644 (file)
@@ -403,7 +403,9 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_Object) theObject)
     Handle(GEOM_Function) aFunction = theObject->GetFunction(1);
     GEOM_ISubShape aSSI (aFunction);
     Handle(GEOM_Function) aMainShape = aSSI.GetMainShape();
-    aMainShape->RemoveSubShapeReference(aFunction);
+    //If main shape is not null, then remove
+    if(!aMainShape.IsNull())
+      aMainShape->RemoveSubShapeReference(aFunction);
   }
 
   int nb = theObject->GetNbFunctions();