Skip to content

Commit

Permalink
qgssymbollayer.cpp: fix cppcheck warning about possible null pointer …
Browse files Browse the repository at this point in the history
…dereference
  • Loading branch information
rouault authored and m-kuhn committed Jun 14, 2021
1 parent e918d6e commit 78a6e32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/symbology/qgssymbollayer.cpp
Expand Up @@ -122,14 +122,14 @@ void QgsSymbolLayer::setDataDefinedProperty( QgsSymbolLayer::Property key, const

void QgsSymbolLayer::startFeatureRender( const QgsFeature &feature, QgsRenderContext &context )
{
if ( subSymbol() )
subSymbol()->startFeatureRender( feature, context );
if ( QgsSymbol *lSubSymbol = subSymbol() )
lSubSymbol->startFeatureRender( feature, context );
}

void QgsSymbolLayer::stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context )
{
if ( subSymbol() )
subSymbol()->stopFeatureRender( feature, context );
if ( QgsSymbol *lSubSymbol = subSymbol() )
lSubSymbol->stopFeatureRender( feature, context );
}

QgsSymbol *QgsSymbolLayer::subSymbol()
Expand Down

0 comments on commit 78a6e32

Please sign in to comment.