diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2010-03-30 08:48:47 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2010-03-30 08:48:47 (GMT) |
commit | 966768a637a607abd9c26917e62be994c397864f (patch) | |
tree | ae42f03b0b5f629f645c5e4b412077a0ca13f6cf /src/gui/styles/qgtkstyle.cpp | |
parent | 38af39aceb419e4b2eb248761fddaec92184c0f7 (diff) | |
download | Qt-966768a637a607abd9c26917e62be994c397864f.zip Qt-966768a637a607abd9c26917e62be994c397864f.tar.gz Qt-966768a637a607abd9c26917e62be994c397864f.tar.bz2 |
Fix a crash in QGtkStyle when theme not available
subElementRect failed to verify that the theme was
resolved before accessing certain data structures.
Reviewed-by: ogoffart
Task-number: QTBUG-9240
Diffstat (limited to 'src/gui/styles/qgtkstyle.cpp')
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index b5f052b..ddae3d8 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -3398,6 +3398,9 @@ QRect QGtkStyle::subElementRect(SubElement element, const QStyleOption *option, Q_D(const QGtkStyle); QRect r = QCleanlooksStyle::subElementRect(element, option, widget); + if (!d->isThemeAvailable()) + return r; + switch (element) { case SE_ProgressBarLabel: case SE_ProgressBarContents: |