]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
[GITHUB][GUI: PR #1] QtxDockWidget destructor generates a segmentation fault github/pr-1_QtxDockWidget_destructor V9_13_0rc1 V9_13_0rc2 35/head
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 11 Jul 2024 07:21:18 +0000 (09:21 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Thu, 11 Jul 2024 07:21:18 +0000 (09:21 +0200)
src/Qtx/QtxDockWidget.cxx

index 9c994edbb286206c409866f8253bc8db3bd5a51f..0e19ed92d8d87a181d13e7bc90dca8673bc924d5 100644 (file)
@@ -368,9 +368,11 @@ myWatcher( 0 )
 */
 QtxDockWidget::~QtxDockWidget()
 {
-  myWatcher->setParent(nullptr);
-  delete myWatcher;
-  myWatcher = 0;
+  if (myWatcher){
+    myWatcher->setParent(nullptr);
+    delete myWatcher;
+    myWatcher = 0;
+  }
 }
 
 /*!