Skip to content

Commit

Permalink
Don't crash when some shortcuts can't be loaded
Browse files Browse the repository at this point in the history
Fix #14528

(cherry picked from commit 76296c8)
  • Loading branch information
m-kuhn authored and jef-n committed Mar 23, 2016
1 parent 0c65f7f commit addcf3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/qgsconfigureshortcutsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ void QgsConfigureShortcutsDialog::loadShortcuts()
actionName = child.attribute( "name" );
actionShortcut = child.attribute( "shortcut" );
action = QgsShortcutsManager::instance()->actionByName( actionName );
QgsShortcutsManager::instance()->setActionShortcut( action, actionShortcut );
if ( action )
QgsShortcutsManager::instance()->setActionShortcut( action, actionShortcut );
child = child.nextSiblingElement();
}

Expand Down

0 comments on commit addcf3c

Please sign in to comment.