mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 19:55:07 +02:00
Merge pull request #2647 from AndrewMeadows/fix-crash
fix crash: don't access null action
This commit is contained in:
commit
5f1e63bb4a
1 changed files with 6 additions and 1 deletions
|
@ -707,7 +707,12 @@ bool Menu::isOptionChecked(const QString& menuOption) {
|
|||
}
|
||||
|
||||
void Menu::triggerOption(const QString& menuOption) {
|
||||
_actionHash.value(menuOption)->trigger();
|
||||
QAction* action = _actionHash.value(menuOption);
|
||||
if (action) {
|
||||
action->trigger();
|
||||
} else {
|
||||
qDebug() << "NULL Action for menuOption '" << menuOption << "'";
|
||||
}
|
||||
}
|
||||
|
||||
QAction* Menu::getActionForOption(const QString& menuOption) {
|
||||
|
|
Loading…
Reference in a new issue