]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug SWP13026
authorabd <abd@opencascade.com>
Wed, 16 Aug 2006 14:21:54 +0000 (14:21 +0000)
committerabd <abd@opencascade.com>
Wed, 16 Aug 2006 14:21:54 +0000 (14:21 +0000)
Using of QGuardedPtrs instead ordinary pointers

src/VISUGUI/VisuGUI_ClippingDlg.cxx
src/VISUGUI/VisuGUI_ClippingDlg.h

index 30b14c724ae3b9b23649049a0398541f54e38c7f..0be9f3ef5af0866c701e574df77a94aa3eaf8cf4 100644 (file)
@@ -210,7 +210,7 @@ void OrientedPlane::Init()
 
 OrientedPlane::~OrientedPlane()
 {
-  if (myViewWindow)
+  if ( !myViewWindow.isNull() )
     myViewWindow->RemoveActor(myActor);
 
   myActor->Delete();
index c649dd9328083d6e91c31faf3c477732b0853de3..dcc56423e1ba715a8b15d80e50f8870e45bce3d6 100644 (file)
@@ -27,6 +27,7 @@
 
 // QT Includes
 #include <qdialog.h>
+#include <qguardedptr.h>
 #include <qtable.h>
 
 // VTK Includes
@@ -74,7 +75,7 @@ namespace VISU {
 //=================================================================================
 class OrientedPlane: public vtkPlane
 {
-  SVTK_ViewWindow* myViewWindow;
+  QGuardedPtr<SVTK_ViewWindow> myViewWindow;
   vtkDataSetMapper* myMapper;
 
 public: