Do not try to compute the center of a segment of null length (#34407)

Fix #34396
This commit is contained in:
Hugo Mercier 2020-02-12 16:40:53 +01:00 committed by GitHub
parent ac8b7c0b18
commit 0e63de6837
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1653,6 +1653,8 @@ void QgsTemplatedLineSymbolLayerBase::renderPolylineCentral( const QPolygonF &po
( last.y() - it->y() ) * ( last.y() - it->y() ) );
last = *it;
}
if ( qgsDoubleNear( length, 0.0 ) )
return;
const double midPoint = length / 2;