Skip to content

Commit a4b7b71

Browse files
wonder-skmach0
authored andcommitted
Ensure that we have a valid line in line decoration (#4241)
1 parent b8388ee commit a4b7b71

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/symbology-ng/qgslinesymbollayerv2.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,10 @@ void QgsLineDecorationSymbolLayerV2::renderPolyline( const QPolygonF& points, Qg
639639
}
640640

641641
int cnt = points.count();
642+
if ( cnt < 2 )
643+
{
644+
return;
645+
}
642646
QPointF p2 = points.at( --cnt );
643647
QPointF p1 = points.at( --cnt );
644648
while ( p2 == p1 && cnt )

0 commit comments

Comments
 (0)