summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-06 11:43:42 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-06 12:12:55 (GMT)
commit13998901f7831beaaeca6ada4def3e29af4e251d (patch)
tree66ac0f805beb8051781931e82cddcff12ba4833b /src/gui
parent2f289b2a3e7c217c1e5c85e68cde81951a9fbcd7 (diff)
downloadQt-13998901f7831beaaeca6ada4def3e29af4e251d.zip
Qt-13998901f7831beaaeca6ada4def3e29af4e251d.tar.gz
Qt-13998901f7831beaaeca6ada4def3e29af4e251d.tar.bz2
QMenuBar: we can't test the action geometries when it is native
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/qmenubar.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index 4a900d6..389b65f 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -272,6 +272,9 @@ QRect QMenuBarPrivate::actionRect(QAction *act) const
//makes sure the geometries are up-to-date
const_cast<QMenuBarPrivate*>(this)->updateGeometries();
+ if (index >= actionRects.count())
+ return QRect(); // that can happen in case of native menubar
+
QRect ret = actionRects.at(index);
return QStyle::visualRect(q->layoutDirection(), q->rect(), ret);
}