summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r--src/gui/image/qimage.cpp3
1 files changed, 3 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;