Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[symbology] Fix potential crash with data defined symbols
  • Loading branch information
nyalldawson committed May 9, 2015
1 parent 46b9029 commit 65cd9fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/symbology-ng/qgssymbollayerv2.cpp
Expand Up @@ -117,7 +117,9 @@ QVariant QgsSymbolLayerV2::evaluateDataDefinedProperty( const QString &property,
return QVariant();

if ( dd->useExpression() )
return dd->expression()->evaluate( feature );
{
return dd->expression() ? dd->expression()->evaluate( feature ) : QVariant();
}
else if ( feature && !dd->field().isEmpty() && !mFields.isEmpty() )
{
int attributeIndex = mFields.fieldNameIndex( dd->field() );
Expand Down

0 comments on commit 65cd9fc

Please sign in to comment.