summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmapcache_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qpixmapcache_p.h')
-rw-r--r--src/gui/image/qpixmapcache_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/image/qpixmapcache_p.h b/src/gui/image/qpixmapcache_p.h
index 86a1b78..0ed083c 100644
--- a/src/gui/image/qpixmapcache_p.h
+++ b/src/gui/image/qpixmapcache_p.h
@@ -81,8 +81,9 @@ class QPixmapCacheEntry : public QPixmap
public:
QPixmapCacheEntry(const QPixmapCache::Key &key, const QPixmap &pix) : QPixmap(pix), key(key)
{
- if (data && data->classId() == QPixmapData::RasterClass) {
- QRasterPixmapData *d = static_cast<QRasterPixmapData*>(data.data());
+ QPixmapData *pd = pixmapData();
+ if (pd && pd->classId() == QPixmapData::RasterClass) {
+ QRasterPixmapData *d = static_cast<QRasterPixmapData*>(pd);
if (!d->image.isNull() && d->image.d->paintEngine
&& !d->image.d->paintEngine->isActive())
{