summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-04-12 15:39:28 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-04-12 15:39:28 (GMT)
commit3723f30a91eda1c1b247598913cfc02b001a02c9 (patch)
tree234241d0d6dbbf29857c4e66d2723f77239f31ee /src/gui/image
parent6f736694461edc25b6e757f40ab9cad6a9207ad4 (diff)
parent957f36cb498657f94f1b5b92f52713254ff8c051 (diff)
downloadQt-3723f30a91eda1c1b247598913cfc02b001a02c9.zip
Qt-3723f30a91eda1c1b247598913cfc02b001a02c9.tar.gz
Qt-3723f30a91eda1c1b247598913cfc02b001a02c9.tar.bz2
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts: qmake/generators/symbian/symmake.cpp src/gui/image/qimage.cpp src/openvg/qwindowsurface_vgegl.cpp
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qimage.cpp3
-rw-r--r--src/gui/image/qimagewriter.cpp1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index ce1d6d3..d226baf 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -5709,6 +5709,9 @@ void QImage::setAlphaChannel(const QImage &alphaChannel)
else
*this = convertToFormat(QImage::Format_ARGB32_Premultiplied);
+ if (isNull())
+ return;
+
// Slight optimization since alphachannels are returned as 8-bit grays.
if (alphaChannel.d->depth == 8 && alphaChannel.isGrayscale()) {
const uchar *src_data = alphaChannel.d->data;
diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
index a5f7b31..503a1b2 100644
--- a/src/gui/image/qimagewriter.cpp
+++ b/src/gui/image/qimagewriter.cpp
@@ -197,6 +197,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
for (int i = 0; i < keys.size(); ++i) {
QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(keys.at(i)));
if (plugin && (plugin->capabilities(device, testFormat) & QImageIOPlugin::CanWrite)) {
+ delete handler;
handler = plugin->create(device, testFormat);
break;
}