]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To fix a SIGSEV on Cancel of the ScalarMap creatition
authorapo <apo@opencascade.com>
Thu, 2 Feb 2006 07:46:37 +0000 (07:46 +0000)
committerapo <apo@opencascade.com>
Thu, 2 Feb 2006 07:46:37 +0000 (07:46 +0000)
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_Mesh_i.cc

index 9cb3840c51af68dc641d4995a9385421d35cf90e..8a691fd463f73a1af1366f1c0df165bfb158b957 100644 (file)
@@ -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);
     }
   };
 
index 90b9b1ce18e7ddaed18ba36fe2e4f8fa9fbed3aa..2a65400b55d2c1fdca3a026fb360a75e0ca3665b 100644 (file)
@@ -89,8 +89,8 @@ void VISU::Mesh_i::RemoveFromStudy()
     void
     Execute()
     {
-      myRemovable->TSuperClass::RemoveFromStudy();
       VISU::RemoveFromStudy(myRemovable->GetSObject());
+      myRemovable->TSuperClass::RemoveFromStudy();
     }
   };