]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug IPAL21228 SIGSEGV on exit from Salome with active GaussPointsDlg V5_1_main_20090722
authordmv <dmv@opencascade.com>
Tue, 21 Jul 2009 12:28:19 +0000 (12:28 +0000)
committerdmv <dmv@opencascade.com>
Tue, 21 Jul 2009 12:28:19 +0000 (12:28 +0000)
src/VISUGUI/VisuGUI_InputPane.cxx
src/VISUGUI/VisuGUI_Prs3dTools.h

index a4d95edabcb0107d9c2dc2899240c2dd91c2ce59..cfa7c2afff3b0ed2a807b4f5c9f9f218081b277c 100644 (file)
@@ -234,17 +234,19 @@ VisuGUI_InputPane::VisuGUI_InputPane( VISU::VISUType theType,
 //---------------------------------------------------------------
 VisuGUI_InputPane::~VisuGUI_InputPane()
 {
-  LightApp_SelectionMgr* aSelectionMgr = VISU::GetSelectionMgr(myModule);
+  if ( myModule->getApp() ) {
+    LightApp_SelectionMgr* aSelectionMgr = VISU::GetSelectionMgr(myModule);
+    
+    if (myFieldFilter)
+      {
+       aSelectionMgr->removeFilter(myFieldFilter);
+       delete myFieldFilter;
+      }
 
-  if (myFieldFilter)
-  {
-    aSelectionMgr->removeFilter(myFieldFilter);
-    delete myFieldFilter;
+    // Restore initial selection
+    if(isRestoreInitialSelection)
+      aSelectionMgr->setSelectedObjects(mySavedSelection);
   }
-
-  // Restore initial selection
-  if(isRestoreInitialSelection)
-    aSelectionMgr->setSelectedObjects(mySavedSelection);
 }
 
 void VisuGUI_InputPane::SetRestoreInitialSelection(bool on){
index 76b11fce1fedf35420034db983cdae7b89a56bfc..c9864171535fce5997e86534e3d333b4d5117519 100644 (file)
@@ -252,7 +252,8 @@ namespace VISU
            QApplication::restoreOverrideCursor();
            delete aDlg;
          } else {
-           DeletePrs3d(theModule,aPrs3d);
+           if ( theModule->application() )
+             DeletePrs3d(theModule,aPrs3d);
            QApplication::restoreOverrideCursor();
            delete aDlg;
            return NULL;