From 3ff158c41d6e17e75773f28f8e1808702edd81a6 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 13 Oct 2018 17:05:11 +0200 Subject: Fix 00e10ae3189a4407ffb1a48f836cd52dc9a1b6df Sorry my fault since my review was wrong Change-Id: I8bac7232434b0b4ea808176df9cde33f06bfbc6e Reviewed-on: https://gerrit.libreoffice.org/61741 Reviewed-by: Julien Nabet Tested-by: Julien Nabet --- vcl/qt5/Qt5Graphics_GDI.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vcl/qt5') diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx index 91c4c889bc18..f750d1c34ca0 100644 --- a/vcl/qt5/Qt5Graphics_GDI.cxx +++ b/vcl/qt5/Qt5Graphics_GDI.cxx @@ -36,8 +36,9 @@ static const basegfx::B2DPoint aHalfPointOfs(0.5, 0.5); static void AddPolygonToPath(QPainterPath& rPath, const basegfx::B2DPolygon& rPolygon, bool bClosePath, bool bPixelSnap, bool bLineDraw) { + const int nPointCount = rPolygon.count(); // short circuit if there is nothing to do - if (rPolygon.count() == 0) + if (nPointCount == 0) return; const bool bHasCurves = rPolygon.areControlPointsUsed(); -- cgit