Don't crash when some shortcuts can't be loaded

Fix #14528
This commit is contained in:
Matthias Kuhn 2016-03-19 09:35:38 +01:00
parent f3fe6beefc
commit 76296c82e7

View File

@ -224,6 +224,7 @@ void QgsConfigureShortcutsDialog::loadShortcuts()
actionName = child.attribute( "name" );
actionShortcut = child.attribute( "shortcut" );
action = QgsShortcutsManager::instance()->actionByName( actionName );
if ( action )
QgsShortcutsManager::instance()->setActionShortcut( action, actionShortcut );
child = child.nextSiblingElement();
}