Commit be4f594d authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Changed an assert to a warning

If someone sees a warning that velocity is zero, please let me know. I need
to find out why it happens.

CCBUG:321769
parent c2fcdced
......@@ -199,8 +199,11 @@ void KisToolFreehandHelper::paintBezierSegment(KisPaintInformation pi1, KisPaint
qreal velocity1 = QLineF(QPointF(), tangent1).length();
qreal velocity2 = QLineF(QPointF(), tangent2).length();
Q_ASSERT(velocity1 > 0);
Q_ASSERT(velocity2 > 0);
if (velocity1 == 0.0 || velocity2 == 0.0) {
velocity1 = 1e-6;
velocity2 = 1e-6;
qWarning() << "WARNING: Basic Smoothing: Velocity is Zero! Please report a bug:" << ppVar(velocity1) << ppVar(velocity2);
}
qreal similarity = qMin(velocity1/velocity2, velocity2/velocity1);
......
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