summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-11-04 18:49:36 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-11-04 18:49:36 (GMT)
commit6c45f03e9d7ab9ed5ea44ab7fef021a56ba007c3 (patch)
treec0c945082c149e25fb1175b4575733b3794744ec /src/gui/image
parent5980acde99d393010d7d713006e5d4c34d945cf7 (diff)
parentad3fa7ce6b8a36c2b23f0364f867713f63c6da3b (diff)
downloadQt-6c45f03e9d7ab9ed5ea44ab7fef021a56ba007c3.zip
Qt-6c45f03e9d7ab9ed5ea44ab7fef021a56ba007c3.tar.gz
Qt-6c45f03e9d7ab9ed5ea44ab7fef021a56ba007c3.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qimage.cpp3
-rw-r--r--src/gui/image/qpixmap_x11.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 571ef9d..21ca1e3 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4083,7 +4083,8 @@ QImage QImage::createAlphaMask(Qt::ImageConversionFlags flags) const
}
QImage mask(d->width, d->height, Format_MonoLSB);
- dither_to_Mono(mask.d, d, flags, true);
+ if (!mask.isNull())
+ dither_to_Mono(mask.d, d, flags, true);
return mask;
}
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;