summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-12-08 17:49:54 +0100
committerTomaž Vajngerl <quikee@gmail.com>2016-12-08 17:20:33 +0000
commitcee552d2071601b6f4131eda9e9a0a17768ea272 (patch)
tree6bef401090fedaf87803a0a6bc219947d7453095
parentsw: remove some inline version control in uibase (diff)
downloadcore-cee552d2071601b6f4131eda9e9a0a17768ea272.tar.gz
core-cee552d2071601b6f4131eda9e9a0a17768ea272.zip
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>
-rw-r--r--vcl/opengl/RenderList.cxx2
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;