From: Nabil Ghodbane Date: Thu, 11 Jul 2024 07:21:18 +0000 (+0200) Subject: [GITHUB][GUI: PR #1] QtxDockWidget destructor generates a segmentation fault X-Git-Tag: V9_13_0rc1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Ftlpr%2F35%2Fhead;p=modules%2Fgui.git [GITHUB][GUI: PR #1] QtxDockWidget destructor generates a segmentation fault --- diff --git a/src/Qtx/QtxDockWidget.cxx b/src/Qtx/QtxDockWidget.cxx index 9c994edbb..0e19ed92d 100644 --- a/src/Qtx/QtxDockWidget.cxx +++ b/src/Qtx/QtxDockWidget.cxx @@ -368,9 +368,11 @@ myWatcher( 0 ) */ QtxDockWidget::~QtxDockWidget() { - myWatcher->setParent(nullptr); - delete myWatcher; - myWatcher = 0; + if (myWatcher){ + myWatcher->setParent(nullptr); + delete myWatcher; + myWatcher = 0; + } } /*!