diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/image/qpixmapfilter.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index 2792e45..c605880 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -777,6 +777,9 @@ void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transp Q_GUI_EXPORT QImage qt_halfScaled(const QImage &source) { + if (source.width() < 2 || source.height() < 2) + return QImage(); + QImage srcImage = source; if (source.format() == QImage::Format_Indexed8) { @@ -869,7 +872,7 @@ Q_GUI_EXPORT void qt_blurImage(QPainter *p, QImage &blurImage, qreal radius, boo } qreal scale = 1; - if (radius >= 4) { + if (radius >= 4 && blurImage.width() >= 2 && blurImage.height() >= 2) { blurImage = qt_halfScaled(blurImage); scale = 2; radius *= qreal(0.5); |