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] );
+ }
}
}
}