From: Friedemann Kleint Date: Wed, 2 May 2012 12:18:35 +0000 (+0200) Subject: Windows: Fix a crash in Vista style. X-Git-Tag: 071012110112~1270 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=77a8bd1e01251211701fa094278b8ddc23b7e6ba;p=profile%2Fivi%2Fqtbase.git Windows: Fix a crash in Vista style. Do not query the paintDevice of a backing store that has not received a resize yet. Change-Id: I49bf8f7e85c092c5664e5bc507802bd2cd8b62ea Reviewed-by: Miikka Heikkinen Reviewed-by: Friedemann Kleint --- diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp index f9b7939..091b27d 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; } }