From 76296c82e7e9225c6be3c00d48b4bf748ca5daa8 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Sat, 19 Mar 2016 09:35:38 +0100 Subject: [PATCH] Don't crash when some shortcuts can't be loaded Fix #14528 --- src/app/qgsconfigureshortcutsdialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/qgsconfigureshortcutsdialog.cpp b/src/app/qgsconfigureshortcutsdialog.cpp index 7e37e7ef64d..9903b626611 100644 --- a/src/app/qgsconfigureshortcutsdialog.cpp +++ b/src/app/qgsconfigureshortcutsdialog.cpp @@ -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(); }