From f660eeb53afac1297a8ccabafb18de16de1fe62f Mon Sep 17 00:00:00 2001 From: abd Date: Wed, 16 Aug 2006 14:21:54 +0000 Subject: [PATCH] Bug SWP13026 Using of QGuardedPtrs instead ordinary pointers --- src/VISUGUI/VisuGUI_ClippingDlg.cxx | 2 +- src/VISUGUI/VisuGUI_ClippingDlg.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/VISUGUI/VisuGUI_ClippingDlg.cxx b/src/VISUGUI/VisuGUI_ClippingDlg.cxx index 30b14c72..0be9f3ef 100644 --- a/src/VISUGUI/VisuGUI_ClippingDlg.cxx +++ b/src/VISUGUI/VisuGUI_ClippingDlg.cxx @@ -210,7 +210,7 @@ void OrientedPlane::Init() OrientedPlane::~OrientedPlane() { - if (myViewWindow) + if ( !myViewWindow.isNull() ) myViewWindow->RemoveActor(myActor); myActor->Delete(); diff --git a/src/VISUGUI/VisuGUI_ClippingDlg.h b/src/VISUGUI/VisuGUI_ClippingDlg.h index c649dd93..dcc56423 100644 --- a/src/VISUGUI/VisuGUI_ClippingDlg.h +++ b/src/VISUGUI/VisuGUI_ClippingDlg.h @@ -27,6 +27,7 @@ // QT Includes #include +#include #include // VTK Includes @@ -74,7 +75,7 @@ namespace VISU { //================================================================================= class OrientedPlane: public vtkPlane { - SVTK_ViewWindow* myViewWindow; + QGuardedPtr myViewWindow; vtkDataSetMapper* myMapper; public: -- 2.39.2