summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qwindowsxpstyle.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-04-14 09:05:51 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-04-14 09:09:30 (GMT)
commit4d82197292815c718a569a953de8082e64fc7e46 (patch)
treeed4953b5de7a13206283eb0c7507ddfcb4ef093e /src/gui/styles/qwindowsxpstyle.cpp
parent52f87de53328c661049acf09d5fedc1850aa9bfa (diff)
downloadQt-4d82197292815c718a569a953de8082e64fc7e46.zip
Qt-4d82197292815c718a569a953de8082e64fc7e46.tar.gz
Qt-4d82197292815c718a569a953de8082e64fc7e46.tar.bz2
Don't crash in XP style if the painter is inactive.
Diffstat (limited to 'src/gui/styles/qwindowsxpstyle.cpp')
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp
index 9d735a7..2f4254e 100644
--- a/src/gui/styles/qwindowsxpstyle.cpp
+++ b/src/gui/styles/qwindowsxpstyle.cpp
@@ -607,7 +607,7 @@ void QWindowsXPStylePrivate::drawBackground(XPThemeData &themeData)
QPainter *painter = themeData.painter;
Q_ASSERT_X(painter != 0, "QWindowsXPStylePrivate::drawBackground()", "Trying to draw a theme part without a painter");
- if (!painter)
+ if (!painter || !painter->isActive())
return;
painter->save();
@@ -2834,7 +2834,7 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo
bflags |= State_MouseOver;
}
}
-
+
QStyleOption tool(0);
tool.palette = toolbutton->palette;
if (toolbutton->subControls & SC_ToolButton) {