summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qpixmap.cpp')
-rw-r--r--src/gui/image/qpixmap.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 21640ca4bb..cc7b08bce7 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1320,6 +1320,8 @@ QPixmap QPixmap::scaled(const QSize& s, Qt::AspectRatioMode aspectMode, Qt::Tran
QSize newSize = size();
newSize.scale(s, aspectMode);
+ newSize.rwidth() = qMax(newSize.width(), 1);
+ newSize.rheight() = qMax(newSize.height(), 1);
if (newSize == size())
return *this;