Skip to content

Commit

Permalink
Don't try to render empty image paths for raster image marker
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 5, 2018
1 parent 3136885 commit e6bbcbb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/symbology/qgsmarkersymbollayer.cpp
Expand Up @@ -2676,8 +2676,6 @@ void QgsRasterMarkerSymbolLayer::renderPoint( QPointF point, QgsSymbolRenderCont
return;
}

p->save();

QString path = mPath;
if ( mDataDefinedProperties.isActive( QgsSymbolLayer::PropertyName ) )
{
Expand All @@ -2693,6 +2691,11 @@ void QgsRasterMarkerSymbolLayer::renderPoint( QPointF point, QgsSymbolRenderCont
}
}

if ( path.isEmpty() )
return;

p->save();

QPointF outputOffset;
double angle = 0.0;
calculateOffsetAndRotation( context, scaledSize, scaledSize * ( height / width ), outputOffset, angle );
Expand Down

0 comments on commit e6bbcbb

Please sign in to comment.