Skip to content

Commit 65cd9fc

Browse files
committedMay 9, 2015
[symbology] Fix potential crash with data defined symbols
1 parent 46b9029 commit 65cd9fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/core/symbology-ng/qgssymbollayerv2.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ QVariant QgsSymbolLayerV2::evaluateDataDefinedProperty( const QString &property,
117117
return QVariant();
118118

119119
if ( dd->useExpression() )
120-
return dd->expression()->evaluate( feature );
120+
{
121+
return dd->expression() ? dd->expression()->evaluate( feature ) : QVariant();
122+
}
121123
else if ( feature && !dd->field().isEmpty() && !mFields.isEmpty() )
122124
{
123125
int attributeIndex = mFields.fieldNameIndex( dd->field() );

0 commit comments

Comments
 (0)
Please sign in to comment.