diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-09-26 10:57:04 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2017-09-26 12:05:13 +0000 |
commit | 807fa90b32466fd936704459884c12214d8a254f (patch) | |
tree | e857b3b77d44ce828b8ddaf3bf7ab6ddbecc3e77 /src/gui/painting | |
parent | 2b51ad471270c01858369f10c7645d863d89160c (diff) |
Fix crash with clips entirely outside glyph map
When the range to work on is empty just continue to next span.
Task-number: QTBUG-63412
Change-Id: Ic5cb77ed438eb9c218f482095aa0cd4e3c2fc6e6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index c78fdfe62e..6c25710271 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -5627,6 +5627,8 @@ static void qt_alphamapblit_generic(QRasterBuffer *rasterBuffer, int start = qMax<int>(x, clip.x); int end = qMin<int>(x + mapWidth, clip.x + clip.len); + if (end <= start) + continue; Q_ASSERT(end - start <= buffer_size); QRgba64 *dest = destFetch64((QRgba64*)buffer, rasterBuffer, start, clip.y, end - start); @@ -5900,6 +5902,8 @@ static void qt_alphargbblit_generic(QRasterBuffer *rasterBuffer, int start = qMax<int>(x, clip.x); int end = qMin<int>(x + mapWidth, clip.x + clip.len); + if (end <= start) + continue; Q_ASSERT(end - start <= buffer_size); QRgba64 *dest = destFetch64((QRgba64*)buffer, rasterBuffer, start, clip.y, end - start); |