mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 20:31:29 +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) {
|
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