From 2227b3400ef720bbc2226566a4445e83d854c506 Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 17 Oct 2008 05:55:47 +0000 Subject: [PATCH] Fix for IPAL20478 (5x: SIGSEGV is raised after closing application). --- src/VISUGUI/VisuGUI_Sweep.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 (...) { -- 2.39.2