commit | 4e142b60790638e4495b4fd6551702470cf4c38f | [log] [tgz] |
---|---|---|
author | Albert Astals Cid <aacid@kde.org> | Mon Mar 04 20:12:01 2013 +0100 |
committer | Albert Astals Cid <aacid@kde.org> | Mon Mar 04 20:12:01 2013 +0100 |
tree | 25648b54d5424e1a4c7e61e875edb8d9bd314efd | |
parent | a766740cf5a5a7580935a026bf15fbd668aa0fdf [diff] |
Make sure we don't try to paint in x < 0 Fixes crash in KDE bug #315432
diff --git a/splash/Splash.cc b/splash/Splash.cc index 3d80c4c..cd0ec72 100644 --- a/splash/Splash.cc +++ b/splash/Splash.cc
@@ -3927,6 +3927,8 @@ xa = imgCoordMungeLower(section[i].xa0 + ((SplashCoord)y + 0.5 - section[i].ya0) * section[i].dxdya); + if (unlikely(xa < 0)) + xa = 0; xb = imgCoordMungeUpper(section[i].xb0 + ((SplashCoord)y + 0.5 - section[i].yb0) * section[i].dxdyb);