From: dmv Date: Tue, 21 Jul 2009 12:28:19 +0000 (+0000) Subject: Bug IPAL21228 SIGSEGV on exit from Salome with active GaussPointsDlg X-Git-Tag: V5_1_main_20090722 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7f261745dc57cfa7b63077b5fd7d59e88f4072f9;p=modules%2Fvisu.git Bug IPAL21228 SIGSEGV on exit from Salome with active GaussPointsDlg --- diff --git a/src/VISUGUI/VisuGUI_InputPane.cxx b/src/VISUGUI/VisuGUI_InputPane.cxx index a4d95eda..cfa7c2af 100644 --- a/src/VISUGUI/VisuGUI_InputPane.cxx +++ b/src/VISUGUI/VisuGUI_InputPane.cxx @@ -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){ diff --git a/src/VISUGUI/VisuGUI_Prs3dTools.h b/src/VISUGUI/VisuGUI_Prs3dTools.h index 76b11fce..c9864171 100644 --- a/src/VISUGUI/VisuGUI_Prs3dTools.h +++ b/src/VISUGUI/VisuGUI_Prs3dTools.h @@ -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;