Commit 3b07e1cb authored by Jan Möbius's avatar Jan Möbius

Fixed crash when no default view mode was set

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11613 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6df7c06e
......@@ -523,6 +523,12 @@ bool CoreWidget::addContextMenus( QMenu* _menu , ContextMenuType _type , int _id
break;
}
}
// Default to mode all (0) if not found
if ( id == -1 ) {
emit log(LOGERR, tr("Unable to find view mode %1.").arg(OpenFlipper::Options::currentViewMode()) );
id = 0;
}
/// \todo Sort the menu entries by the order given in visibleContextMenus
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment