mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 05:48:39 +02:00
Fix possible crash in Menu::removeSeparator
This commit is contained in:
parent
31e0cfe296
commit
e265a0a1f8
1 changed files with 1 additions and 1 deletions
|
@ -470,8 +470,8 @@ void Menu::removeSeparator(const QString& menuName, const QString& separatorName
|
|||
if (menu) {
|
||||
int textAt = findPositionOfMenuItem(menu, separatorName);
|
||||
QList<QAction*> menuActions = menu->actions();
|
||||
QAction* separatorText = menuActions[textAt];
|
||||
if (textAt > 0 && textAt < menuActions.size()) {
|
||||
QAction* separatorText = menuActions[textAt];
|
||||
QAction* separatorLine = menuActions[textAt - 1];
|
||||
if (separatorLine) {
|
||||
if (separatorLine->isSeparator()) {
|
||||
|
|
Loading…
Reference in a new issue