mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 02:03:57 +02:00
fix crash: don't access null action
In particular, don't crash on pressing Enter when lacking qxmpp support
This commit is contained in:
parent
67c8fd5630
commit
ac9ead36e2
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