Qt: Fix crash double-clicking menus in shortcut settings (fixes #1627)

This commit is contained in:
Vicki Pfau 2020-01-20 18:11:13 -08:00
parent 84bddfad69
commit e53df9759e
2 changed files with 2 additions and 1 deletions

View File

@ -114,6 +114,7 @@ Other fixes:
- Qt: Fix sprite view using wrong base address (fixes mgba.io/i/1603) - Qt: Fix sprite view using wrong base address (fixes mgba.io/i/1603)
- Qt: Fix inability to clear default keybindings - Qt: Fix inability to clear default keybindings
- Qt: Release held actions if they get rebound - Qt: Release held actions if they get rebound
- Qt: Fix crash double-clicking menus in shortcut settings (fixes mgba.io/i/1627)
- Vita: Fix analog controls (fixes mgba.io/i/1554) - Vita: Fix analog controls (fixes mgba.io/i/1554)
- Wii: Fix game fast-forwarding after slowing down - Wii: Fix game fast-forwarding after slowing down
- Wii: Improve audio buffering (fixes mgba.io/i/1617) - Wii: Improve audio buffering (fixes mgba.io/i/1617)

View File

@ -61,7 +61,7 @@ void ShortcutView::load(const QModelIndex& index) {
} }
QString name = m_model->name(index); QString name = m_model->name(index);
const Shortcut* item = m_controller->shortcut(name); const Shortcut* item = m_controller->shortcut(name);
if (!item->action()) { if (!item || !item->action()) {
return; return;
} }
int shortcut = item->shortcut(); int shortcut = item->shortcut();