mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 17:03:11 +02:00
Merge pull request #9921 from jherico/menu_fix
Fix possible crash in Menu::removeSeparator
This commit is contained in:
commit
92e3f8768c
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