summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/opengl/gdiimpl.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 34a8b51d5bf3..c264c91a20b6 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1899,6 +1899,8 @@ bool OpenGLSalGraphicsImpl::drawPolyPolygon( const basegfx::B2DPolyPolygon& rPol
{
for (const basegfx::B2DPolygon& rPolygon : rPolyPolygon)
{
+ if (rPolygon.count() <= 1)
+ continue;
basegfx::B2DPolygon aPolygon(rPolygon);
if (rPolygon.areControlPointsUsed())
aPolygon = rPolygon.getDefaultAdaptiveSubdivision();
@@ -1923,6 +1925,8 @@ bool OpenGLSalGraphicsImpl::drawPolyLine(
VCL_GL_INFO( "::drawPolyLine trans " << fTransparency );
if( mnLineColor == SALCOLOR_NONE )
return true;
+ if (rPolygon.count() <= 1)
+ return true;
const bool bIsHairline = (rLineWidth.getX() == rLineWidth.getY()) && (rLineWidth.getX() <= 1.2);
const float fLineWidth = bIsHairline ? 1.0f : rLineWidth.getX();