diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-04 11:05:46 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-04 11:05:46 (GMT) |
commit | dfceed4535110d345b89658729b66bbdb2c3d7ca (patch) | |
tree | cb6cb7bb3b3e6a500394ca22f4768ce054583a8a /src/gui/image | |
parent | 1400ce5b85fbe7c67899f5f62bfd276eecb21ae0 (diff) | |
download | Qt-dfceed4535110d345b89658729b66bbdb2c3d7ca.zip Qt-dfceed4535110d345b89658729b66bbdb2c3d7ca.tar.gz Qt-dfceed4535110d345b89658729b66bbdb2c3d7ca.tar.bz2 |
Fixed crash when QImage::createAlphaMask() runs out of memory
Reviewed-by: Trond
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qimage.cpp | 3 |
1 files changed, 2 insertions, 1 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; } |