From: apo Date: Thu, 2 Feb 2006 07:46:37 +0000 (+0000) Subject: To fix a SIGSEV on Cancel of the ScalarMap creatition X-Git-Tag: mergeto_trunk_07Feb06~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d147334249a8c321fb69080c10b27bae45d590b4;p=modules%2Fvisu.git To fix a SIGSEV on Cancel of the ScalarMap creatition --- 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(); } };