diff options
author | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2010-12-22 17:13:30 +0100 |
---|---|---|
committer | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2010-12-22 17:16:38 +0100 |
commit | 8a3c4c8283e4762744a29262ce507713565c1c0c (patch) | |
tree | 58dd4f6b14aa353f038032b3c645f4a48704dc33 /src/gui/styles/qwindowsstyle.cpp | |
parent | a5110b5d40b70fb44ed98aa8861b676df1e78385 (diff) |
Fix crash in indeterminate progressbars on windows
Note that this is a surgical fix for 4.7 only.
In 4.8 we will add these checks at the top
of the styling functions or in the widgets instead.
Task-number:QTBUG-15227
Reviewed-by:gabi
Diffstat (limited to 'src/gui/styles/qwindowsstyle.cpp')
-rw-r--r-- | src/gui/styles/qwindowsstyle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index 654be3c230..32a6d8d110 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -2397,8 +2397,10 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai #ifndef QT_NO_PROGRESSBAR case CE_ProgressBarContents: if (const QStyleOptionProgressBar *pb = qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) { - QRect rect = pb->rect; + if (!rect.isValid()) + return; + bool vertical = false; bool inverted = false; |