Skip to content

Commit efdbb87

Browse files
committedJun 17, 2016
Fix Coverity null pointer dereference warning
1 parent 1ff1875 commit efdbb87

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎src/core/dxf/qgsdxfexport.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -963,9 +963,8 @@ void QgsDxfExport::writeEntities()
963963
const QgsAbstractVectorLayerLabeling *labeling = vl->labeling();
964964
QgsDxfLabelProvider *lp = nullptr;
965965
QgsDxfRuleBasedLabelProvider *rblp = nullptr;
966-
if ( dynamic_cast<const QgsRuleBasedLabeling*>( labeling ) )
966+
if ( const QgsRuleBasedLabeling *rbl = dynamic_cast<const QgsRuleBasedLabeling*>( labeling ) )
967967
{
968-
const QgsRuleBasedLabeling *rbl = dynamic_cast<const QgsRuleBasedLabeling*>( labeling );
969968
rblp = new QgsDxfRuleBasedLabelProvider( *rbl, vl, this );
970969
rblp->reinit( vl );
971970
engine.addProvider( rblp );

0 commit comments

Comments
 (0)
Please sign in to comment.