summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-09 18:19:56 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-09 18:19:56 (GMT)
commitea65e98e89967044446e95f3e0943631fb10bf39 (patch)
treeb4bf965912eddccf444e2c934ec211f7e2e29f08 /src/gui/image/qpixmap.cpp
parent20a3f5a4748f04d8a584040256755af7f97e870d (diff)
parent1c5da7207a21cc44a4a08d291c290ffcd9b958fd (diff)
downloadQt-ea65e98e89967044446e95f3e0943631fb10bf39.zip
Qt-ea65e98e89967044446e95f3e0943631fb10bf39.tar.gz
Qt-ea65e98e89967044446e95f3e0943631fb10bf39.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Prevent crash in OpenGL engine when scaling images / pixmaps.
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 1a83318..ed1b0f0 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1479,6 +1479,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;