Skip to content

Commit

Permalink
Fix Coverity null pointer dereference warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 17, 2016
1 parent 1ff1875 commit efdbb87
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/dxf/qgsdxfexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,9 +963,8 @@ void QgsDxfExport::writeEntities()
const QgsAbstractVectorLayerLabeling *labeling = vl->labeling();
QgsDxfLabelProvider *lp = nullptr;
QgsDxfRuleBasedLabelProvider *rblp = nullptr;
if ( dynamic_cast<const QgsRuleBasedLabeling*>( labeling ) )
if ( const QgsRuleBasedLabeling *rbl = dynamic_cast<const QgsRuleBasedLabeling*>( labeling ) )
{
const QgsRuleBasedLabeling *rbl = dynamic_cast<const QgsRuleBasedLabeling*>( labeling );
rblp = new QgsDxfRuleBasedLabelProvider( *rbl, vl, this );
rblp->reinit( vl );
engine.addProvider( rblp );
Expand Down

0 comments on commit efdbb87

Please sign in to comment.