From: stv Date: Wed, 2 Nov 2011 12:08:19 +0000 (+0000) Subject: Check of ViewManager existance X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c56d7f5b661e86dba4e937d368d4df360b018c76;p=modules%2Fgui.git Check of ViewManager existance --- diff --git a/src/SUIT/SUIT_Accel.cxx b/src/SUIT/SUIT_Accel.cxx index 973189d0a..6b5204b96 100644 --- a/src/SUIT/SUIT_Accel.cxx +++ b/src/SUIT/SUIT_Accel.cxx @@ -131,11 +131,14 @@ bool SUIT_Accel::eventFilter( QObject *obj, QEvent *event ) if ( key ) { SUIT_ViewWindow* vw = ::getParentViewWindow( obj ); if ( vw ) { - QString type = vw->getViewManager()->getViewModel()->getType(); - if ( myMap.contains( type ) ) { - IdActionMap idActionMap = myMap[type]; - if ( idActionMap.contains( key ) ) { - return vw->onAccelAction( idActionMap[key] ); + if ( vw->getViewManager() && vw->getViewManager()->getViewModel() ) + { + QString type = vw->getViewManager()->getViewModel()->getType(); + if ( myMap.contains( type ) ) { + IdActionMap idActionMap = myMap[type]; + if ( idActionMap.contains( key ) ) { + return vw->onAccelAction( idActionMap[key] ); + } } } }