diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2016-12-08 17:49:54 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2016-12-13 11:57:08 +0000 |
commit | 6cf3040fe180ae684a60655685a493843c2b162a (patch) | |
tree | 690216e6c64db59700548219753c5cb2849f6227 | |
parent | 26217b01d5630ddf63c60b4400d3a58d3c0dd789 (diff) |
tdf#104034 skip polygons with less than 2 points
We can get polypolgons with polygons that have 0 or 1 point only,
so we need to guard agains division-by-zero errors by skipping if
we detect such polygons (as we can't draw them anyway).
Change-Id: Ia27fcde9467864b10572a78a848ea642a3559185
Reviewed-on: https://gerrit.libreoffice.org/31770
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit cee552d2071601b6f4131eda9e9a0a17768ea272)
Reviewed-on: https://gerrit.libreoffice.org/31789
-rw-r--r-- | vcl/opengl/RenderList.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/opengl/RenderList.cxx b/vcl/opengl/RenderList.cxx index 5f99513bba17..cef311f9d22a 100644 --- a/vcl/opengl/RenderList.cxx +++ b/vcl/opengl/RenderList.cxx @@ -326,6 +326,8 @@ void RenderList::addDrawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, aPolygon = rPolygon.getDefaultAdaptiveSubdivision(); sal_uInt32 nPoints = aPolygon.count(); + if (nPoints <= 1) + continue; GLfloat x1, y1, x2, y2; sal_uInt32 index1, index2; |