tdf#105656 only delete path if less than 2 points

This prevents the crash. It might be related to
gerrit #/c/33654

Change-Id: I92907c7874964af722b69ed8afd9249e110b3401
Reviewed-on: https://gerrit.libreoffice.org/33907
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
This commit is contained in:
Regina Henschel
2017-02-04 00:19:46 +01:00
committed by jan iversen
parent e6a9dc22a4
commit 9e8f2afc2e

View File

@@ -879,7 +879,7 @@ bool ImpPathForDragAndCreate::endPathDrag(SdrDragStat& rDrag)
basegfx::B2DPolygon aCandidate(aTempPolyPolygon.getB2DPolygon(nPoly));
aCandidate.remove(nPnt);
if((IsClosed(meObjectKind) && aCandidate.count() < 3L) || aCandidate.count() < 2L)
if(aCandidate.count() < 2L)
{
aTempPolyPolygon.remove(nPoly);
}