Skip to content
Permalink
Browse files

Fix crash in arrow symbol layer

  • Loading branch information
nyalldawson committed Jun 14, 2016
1 parent 9df87a6 commit 09b6d5893925c326d44bb3e8c0e1f3efbc710838
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/core/symbology-ng/qgsarrowsymbollayer.cpp
@@ -762,13 +762,16 @@ void QgsArrowSymbolLayer::renderPolyline( const QPolygonF& points, QgsSymbolV2Re
{
_resolveDataDefined( context );

// origin point
QPointF po( points.at( 0 ) );
// destination point
QPointF pd( points.back() );
if ( !points.isEmpty() )
{
// origin point
QPointF po( points.at( 0 ) );
// destination point
QPointF pd( points.back() );

QPolygonF poly = straightArrow( po, pd, mScaledArrowStartWidth, mScaledArrowWidth, mScaledHeadWidth, mScaledHeadHeight, mComputedHeadType, mComputedArrowType, mScaledOffset );
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext() );
QPolygonF poly = straightArrow( po, pd, mScaledArrowStartWidth, mScaledArrowWidth, mScaledHeadWidth, mScaledHeadHeight, mComputedHeadType, mComputedArrowType, mScaledOffset );
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext() );
}
}
else
{

0 comments on commit 09b6d58

Please sign in to comment.
You can’t perform that action at this time.