From 4f5efb008bcf51fbc2fb09697953ba57de8ea6a7 Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 7 Oct 2010 06:40:27 +0000 Subject: [PATCH] Fix for the Bug IPAL22042 TC5.1.5: File - Exit can not stop application execution. --- src/GEOM/GEOM_Engine.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index b0ea5a0c2..d33196f76 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -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(); -- 2.39.2