From: apo Date: Thu, 1 Dec 2005 08:21:09 +0000 (+0000) Subject: To fix a SIGSEV in popup when there is no active view manager X-Git-Tag: TG-D5-38-2003_D2005-20-12~92 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f279da6afcf70a8d9919c3ee9a3e79a900d505fb;p=modules%2Fvisu.git To fix a SIGSEV in popup when there is no active view manager --- diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index 1fc889d1..6648937d 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -641,8 +641,8 @@ namespace VISU return wnd; else { - SUIT_ViewManager* aViewManager = anApp->getViewManager( SVTK_Viewer::Type(), theCreate ); - return dynamic_cast( aViewManager->getActiveView() ); + if(SUIT_ViewManager* aViewManager = anApp->getViewManager( SVTK_Viewer::Type(), theCreate )) + return dynamic_cast( aViewManager->getActiveView() ); } } return NULL;