Commit 87ff2c83 authored by Charles Yin's avatar Charles Yin Committed by Qt by Nokia
Browse files

Don't join between 2 same points



Joining 2 points with same x,y values causes assert in QTriangulatingStroker::normalVector().

Task-number: QTBUG-26528
Change-Id: I2494d7f362e13e41a82753f4bacf97ffbc249cf9
Reviewed-by: default avatarKim M. Kalland <kim.kalland@nokia.com>
parent b8b79a0f
......@@ -231,8 +231,10 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen, co
|| float(pts[0]) != float(pts[2]) || float(pts[1]) != float(pts[3])
|| float(pts[2]) != float(pts[4]) || float(pts[3]) != float(pts[5]))
{
if (previousType != QPainterPath::MoveToElement)
join(pts);
if (float(m_cx) != float(pts[0]) || float(m_cy) != float(pts[1])) {
if (previousType != QPainterPath::MoveToElement)
join(pts);
}
cubicTo(pts);
previousType = QPainterPath::CurveToElement;
previousPts = pts + 4;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment