diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-04-14 09:05:51 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-04-14 09:09:30 (GMT) |
commit | 4d82197292815c718a569a953de8082e64fc7e46 (patch) | |
tree | ed4953b5de7a13206283eb0c7507ddfcb4ef093e /src/gui | |
parent | 52f87de53328c661049acf09d5fedc1850aa9bfa (diff) | |
download | Qt-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')
-rw-r--r-- | src/gui/styles/qwindowsxpstyle.cpp | 4 |
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) { |