From 966768a637a607abd9c26917e62be994c397864f Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 30 Mar 2010 10:48:47 +0200 Subject: 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 --- src/gui/styles/qgtkstyle.cpp | 3 +++ 1 file changed, 3 insertions(+) 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: -- cgit v0.12