diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-04 13:25:23 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-04 13:36:01 (GMT) |
commit | d14cf629997e6cfc454af257f6f0df8ce5224363 (patch) | |
tree | 66a45fd777d49166b568cc469ae79d01bc46ad0e /src/gui/image/qpixmap_x11.cpp | |
parent | 66ae0e9a4a94f006a554d4fec9b6b18a02c802dd (diff) | |
download | Qt-d14cf629997e6cfc454af257f6f0df8ce5224363.zip Qt-d14cf629997e6cfc454af257f6f0df8ce5224363.tar.gz Qt-d14cf629997e6cfc454af257f6f0df8ce5224363.tar.bz2 |
Fixed crash with nullptr in QPixmapData::transformed
Reviewed-By: Trond
Diffstat (limited to 'src/gui/image/qpixmap_x11.cpp')
-rw-r--r-- | src/gui/image/qpixmap_x11.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index 8a0120a..c735031 100644 --- a/src/gui/image/qpixmap_x11.cpp +++ b/src/gui/image/qpixmap_x11.cpp @@ -1916,8 +1916,8 @@ QPixmap QX11PixmapData::transformed(const QTransform &transform, free(dptr); return bm; } else { // color pixmap - QPixmap pm; - QX11PixmapData *x11Data = static_cast<QX11PixmapData*>(pm.data.data()); + QX11PixmapData *x11Data = new QX11PixmapData(QPixmapData::PixmapType); + QPixmap pm(x11Data); x11Data->flags &= ~QX11PixmapData::Uninitialized; x11Data->xinfo = xinfo; x11Data->d = d; |