From: rnv Date: Fri, 17 Oct 2008 05:55:47 +0000 (+0000) Subject: Fix for IPAL20478 (5x: SIGSEGV is raised after closing application). X-Git-Tag: V5_1_0a3~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2227b3400ef720bbc2226566a4445e83d854c506;p=modules%2Fvisu.git Fix for IPAL20478 (5x: SIGSEGV is raised after closing application). --- diff --git a/src/VISUGUI/VisuGUI_Sweep.cxx b/src/VISUGUI/VisuGUI_Sweep.cxx index 1b5ee038..aeebc324 100644 --- a/src/VISUGUI/VisuGUI_Sweep.cxx +++ b/src/VISUGUI/VisuGUI_Sweep.cxx @@ -35,6 +35,7 @@ #include "VisuGUI.h" #include "VisuGUI_Tools.h" +#include "VisuGUI_ViewTools.h" #include "VISU_ColoredPrs3d_i.hh" #include "VISU_Actor.h" @@ -337,6 +338,11 @@ void VisuGUI_Sweep::onSelectionChanged() connect( myViewWindow, SIGNAL( destroyed( QObject * ) ), this, SLOT( onSelectionChanged() ) ); } + if(!VISU::GetActiveViewWindow(myModule)) { + myActor = NULL; + return; + } + VISU::ColoredPrs3d_i* aColoredPrs3d = dynamic_cast< VISU::ColoredPrs3d_i* >( aPrs3d ); anIsValidSelection &= ( aColoredPrs3d && aColoredPrs3d->IsTimeStampFixed() ); @@ -399,7 +405,8 @@ void VisuGUI_Sweep::onValueChanged( int value ) try { myColoredPrs3d->SetMapScale( aValue ); myColoredPrs3d->UpdateActor( myActor ); - myViewWindow->Repaint(); + if(myViewWindow) + myViewWindow->Repaint(); } catch (std::exception& exc) { INFOS( "Follow exception was occured :\n" << exc.what() ); } catch (...) {