Skip to content

Commit 76296c8

Browse files
committed
Don't crash when some shortcuts can't be loaded
Fix #14528
1 parent f3fe6be commit 76296c8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/app/qgsconfigureshortcutsdialog.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ void QgsConfigureShortcutsDialog::loadShortcuts()
224224
actionName = child.attribute( "name" );
225225
actionShortcut = child.attribute( "shortcut" );
226226
action = QgsShortcutsManager::instance()->actionByName( actionName );
227-
QgsShortcutsManager::instance()->setActionShortcut( action, actionShortcut );
227+
if ( action )
228+
QgsShortcutsManager::instance()->setActionShortcut( action, actionShortcut );
228229
child = child.nextSiblingElement();
229230
}
230231

0 commit comments

Comments
 (0)