diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-05 13:07:05 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-05 13:27:36 (GMT) |
commit | 9f86dcf0acaeba57728c3d51a1a6e57f8a8445b2 (patch) | |
tree | 74a7a5bb5b6ec9dbd308853604bd7eb544f5e9fd /src/gui/image/qpixmap.cpp | |
parent | d456ac11027f7573aa32745a8bc972d2b83926f4 (diff) | |
download | Qt-9f86dcf0acaeba57728c3d51a1a6e57f8a8445b2.zip Qt-9f86dcf0acaeba57728c3d51a1a6e57f8a8445b2.tar.gz Qt-9f86dcf0acaeba57728c3d51a1a6e57f8a8445b2.tar.bz2 |
Fixed crash in QPixmap::resize_helper on mac and x11
Reviewed-by: Trond
Diffstat (limited to 'src/gui/image/qpixmap.cpp')
-rw-r--r-- | src/gui/image/qpixmap.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index c452b9a..dfeea76 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -639,13 +639,13 @@ void QPixmap::resize_helper(const QSize &s) QPixmap pm(QSize(w, h), data ? data->type : QPixmapData::PixmapType); bool uninit = false; #if defined(Q_WS_X11) - QX11PixmapData *x11Data = data->classId() == QPixmapData::X11Class ? static_cast<QX11PixmapData*>(data.data()) : 0; + QX11PixmapData *x11Data = data && data->classId() == QPixmapData::X11Class ? static_cast<QX11PixmapData*>(data.data()) : 0; if (x11Data) { pm.x11SetScreen(x11Data->xinfo.screen()); uninit = x11Data->flags & QX11PixmapData::Uninitialized; } #elif defined(Q_WS_MAC) - QMacPixmapData *macData = data->classId() == QPixmapData::MacClass ? static_cast<QMacPixmapData*>(data.data()) : 0; + QMacPixmapData *macData = data && data->classId() == QPixmapData::MacClass ? static_cast<QMacPixmapData*>(data.data()) : 0; if (macData) uninit = macData->uninit; #endif |