mirror of
https://github.com/lubosz/overte.git
synced 2025-04-16 14:16:36 +02:00
Fix crash when try to remove invalid menu item in JavaScript
This commit is contained in:
parent
ddf5539a49
commit
d6b13ef42c
1 changed files with 4 additions and 0 deletions
|
@ -183,6 +183,10 @@ void VrMenu::insertAction(QAction* before, QAction* action) {
|
|||
}
|
||||
|
||||
void VrMenu::removeAction(QAction* action) {
|
||||
if (!action) {
|
||||
qWarning("Attempted to remove invalid menu action");
|
||||
return;
|
||||
}
|
||||
MenuUserData* userData = MenuUserData::forObject(action);
|
||||
if (!userData) {
|
||||
qWarning("Attempted to remove menu action with no found QML object");
|
||||
|
|
Loading…
Reference in a new issue