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
diff --git a/vcl/opengl/RenderList.cxx b/vcl/opengl/RenderList.cxx
index 5f99513..cef311f 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;