Salome HOME
Merge branch 'V7_7_BR' into hydro/imps_2015
[modules/gui.git] / src / OCCViewer / OCCViewer_ViewWindow.cxx
index a0e96792bba525452df09cffa38363629dd3dc4c..0852d0b29ee64b69ac6c25019e3e6871f7e8f9c7 100755 (executable)
@@ -1174,6 +1174,8 @@ void OCCViewer_ViewWindow::createActions()
     return;
 
   SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
+  if( !aResMgr )
+    return;
 
   QtxAction* aAction;
 
@@ -2111,7 +2113,7 @@ void OCCViewer_ViewWindow::onSwitchInteractionStyle( bool on )
 
   // update action state if method is called outside
   QtxAction* a = dynamic_cast<QtxAction*>( toolMgr()->action( SwitchInteractionStyleId ) );
-  if ( a->isChecked() != on )
+  if ( a && a->isChecked() != on )
     a->setChecked( on );
 }
 
@@ -2124,7 +2126,7 @@ void OCCViewer_ViewWindow::onSwitchZoomingStyle( bool on )
 
   // update action state if method is called outside
   QtxAction* a = dynamic_cast<QtxAction*>( toolMgr()->action( SwitchZoomingStyleId ) );
-  if ( a->isChecked() != on )
+  if ( a && a->isChecked() != on )
     a->setChecked( on );
 }