]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To fix a SIGSEV in popup when there is no active view manager
authorapo <apo@opencascade.com>
Thu, 1 Dec 2005 08:21:09 +0000 (08:21 +0000)
committerapo <apo@opencascade.com>
Thu, 1 Dec 2005 08:21:09 +0000 (08:21 +0000)
src/VISUGUI/VisuGUI_Tools.cxx

index 1fc889d10bfff0197d0fa355485b1fce4e563147..6648937ddfa8c8f671b42aa6b7b8468f4103ff7c 100644 (file)
@@ -641,8 +641,8 @@ namespace VISU
        return wnd;
       else
       {
-       SUIT_ViewManager* aViewManager = anApp->getViewManager( SVTK_Viewer::Type(), theCreate );
-       return dynamic_cast<SVTK_ViewWindow*>( aViewManager->getActiveView() );
+       if(SUIT_ViewManager* aViewManager = anApp->getViewManager( SVTK_Viewer::Type(), theCreate ))
+         return dynamic_cast<SVTK_ViewWindow*>( aViewManager->getActiveView() );
       }
     }
     return NULL;