diff options
author | Kavindra Devi Palaraja <kavindra.palaraja@nokia.com> | 2009-04-15 13:08:44 (GMT) |
---|---|---|
committer | Kavindra Devi Palaraja <kavindra.palaraja@nokia.com> | 2009-04-15 13:08:44 (GMT) |
commit | ba6ad129f2dc9d7dd5cbd511c3fe515908f5f6a8 (patch) | |
tree | eb848ccab795ec4514a0fa579ec6932bb1209e13 /src | |
parent | 96a529868cc75523f03aae5eb9ffdf72e29aab96 (diff) | |
parent | 9da65ead69c92df717b1a63fe3c98c0cc73270f9 (diff) | |
download | Qt-ba6ad129f2dc9d7dd5cbd511c3fe515908f5f6a8.zip Qt-ba6ad129f2dc9d7dd5cbd511c3fe515908f5f6a8.tar.gz Qt-ba6ad129f2dc9d7dd5cbd511c3fe515908f5f6a8.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qwindowsurface.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/painting/qwindowsurface.cpp b/src/gui/painting/qwindowsurface.cpp index bcb0380..d941a24 100644 --- a/src/gui/painting/qwindowsurface.cpp +++ b/src/gui/painting/qwindowsurface.cpp @@ -310,10 +310,13 @@ void qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset) int lineskip = img.bytesPerLine(); int depth = img.depth() >> 3; - - const QRect r = rect & QRect(0, 0, img.width(), img.height()); + const QRect imageRect(0, 0, img.width(), img.height()); + const QRect r = rect & imageRect & imageRect.translated(-offset); const QPoint p = rect.topLeft() + offset; + if (r.isEmpty()) + return; + const uchar *src; uchar *dest; |