From c56d7f5b661e86dba4e937d368d4df360b018c76 Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 2 Nov 2011 12:08:19 +0000 Subject: [PATCH] Check of ViewManager existance --- src/SUIT/SUIT_Accel.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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] ); + } } } } -- 2.39.2