summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qwindowsxpstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles/qwindowsxpstyle.cpp')
-rw-r--r--src/widgets/styles/qwindowsxpstyle.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp
index f9b793978b..091b27d87b 100644
--- a/src/widgets/styles/qwindowsxpstyle.cpp
+++ b/src/widgets/styles/qwindowsxpstyle.cpp
@@ -731,8 +731,9 @@ void QWindowsXPStylePrivate::drawBackground(XPThemeData &themeData)
canDrawDirectly = true;
break;
case QInternal::Image:
+ // Ensure the backing store has received as resize and is initialized.
if (QBackingStore *bs = backingStoreForWidget(themeData.widget))
- if (bs->paintDevice() == enginePaintDevice)
+ if (bs->size().isValid() && bs->paintDevice() == enginePaintDevice)
canDrawDirectly = true;
}
}