mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:09:24 +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) {
|
if (menu) {
|
||||||
int textAt = findPositionOfMenuItem(menu, separatorName);
|
int textAt = findPositionOfMenuItem(menu, separatorName);
|
||||||
QList<QAction*> menuActions = menu->actions();
|
QList<QAction*> menuActions = menu->actions();
|
||||||
QAction* separatorText = menuActions[textAt];
|
|
||||||
if (textAt > 0 && textAt < menuActions.size()) {
|
if (textAt > 0 && textAt < menuActions.size()) {
|
||||||
|
QAction* separatorText = menuActions[textAt];
|
||||||
QAction* separatorLine = menuActions[textAt - 1];
|
QAction* separatorLine = menuActions[textAt - 1];
|
||||||
if (separatorLine) {
|
if (separatorLine) {
|
||||||
if (separatorLine->isSeparator()) {
|
if (separatorLine->isSeparator()) {
|
||||||
|
|
Loading…
Reference in a new issue