]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for IPAL20478 (5x: SIGSEGV is raised after closing application).
authorrnv <rnv@opencascade.com>
Fri, 17 Oct 2008 05:55:47 +0000 (05:55 +0000)
committerrnv <rnv@opencascade.com>
Fri, 17 Oct 2008 05:55:47 +0000 (05:55 +0000)
src/VISUGUI/VisuGUI_Sweep.cxx

index 1b5ee0381e2814b25c0bbd8e5ecdabd483e4d905..aeebc3248c5bf2b3d63d5bc254dd3f9e122283a0 100644 (file)
@@ -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<SVTK_ViewWindow>(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 (...) {