From d147334249a8c321fb69080c10b27bae45d590b4 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 2 Feb 2006 07:46:37 +0000 Subject: [PATCH] To fix a SIGSEV on Cancel of the ScalarMap creatition --- src/VISU_I/VISU_ColoredPrs3d_i.cc | 4 +++- src/VISU_I/VISU_Mesh_i.cc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index 9cb3840c..8a691fd4 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -85,8 +85,10 @@ VISU::ColoredPrs3d_i void Execute() { + SALOMEDS::SObject_var aSObject = myRemovable->GetSObject(); + if(!CORBA::is_nil(aSObject.in())) + VISU::RemoveFromStudy(aSObject,false); myRemovable->TSuperClass::RemoveFromStudy(); - VISU::RemoveFromStudy(myRemovable->GetSObject(),false); } }; diff --git a/src/VISU_I/VISU_Mesh_i.cc b/src/VISU_I/VISU_Mesh_i.cc index 90b9b1ce..2a65400b 100644 --- a/src/VISU_I/VISU_Mesh_i.cc +++ b/src/VISU_I/VISU_Mesh_i.cc @@ -89,8 +89,8 @@ void VISU::Mesh_i::RemoveFromStudy() void Execute() { - myRemovable->TSuperClass::RemoveFromStudy(); VISU::RemoveFromStudy(myRemovable->GetSObject()); + myRemovable->TSuperClass::RemoveFromStudy(); } }; -- 2.39.2