From e854ed068d993f1239dbd550e9b7512856f7c1e6 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 7 May 2016 11:37:46 +0300 Subject: [PATCH] Fixed issue #485. Error when drawing a curved path. --HG-- branch : release --- src/libs/vgeometry/vgobject.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libs/vgeometry/vgobject.cpp b/src/libs/vgeometry/vgobject.cpp index 8bcab8340..ab25ae179 100644 --- a/src/libs/vgeometry/vgobject.cpp +++ b/src/libs/vgeometry/vgobject.cpp @@ -352,6 +352,12 @@ int VGObject::IntersectionCircles(const QPointF &c1, double r1, const QPointF &c */ qint32 VGObject::LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, QPointF &p2) { + // Fix for issue #485. https://bitbucket.org/dismine/valentina/issues/485/error-when-drawing-a-curved-path + if (qFuzzyIsNull(line.length())) + { + return 0; + } + //coefficient for equation of segment qreal a = 0, b = 0, c = 0; LineCoefficients(line, &a, &b, &c);