Skip to content
Permalink
Browse files

Coverity null dereference fixes

  • Loading branch information
nyalldawson committed Oct 4, 2015
1 parent c3b0271 commit ae0d377cd26274ff6a240dd46a7f11b3ee975fa0
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
@@ -862,14 +862,14 @@ bool QgsSimpleMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitSc
//color
QColor pc = mPen.color();
QColor bc = mBrush.color();
if ( hasDataDefinedProperty( QgsSymbolLayerV2::EXPR_COLOR ) )
if ( context && hasDataDefinedProperty( QgsSymbolLayerV2::EXPR_COLOR ) )
{
context->setOriginalValueVariable( QgsSymbolLayerV2Utils::encodeColor( bc ) );
QString colorString = evaluateDataDefinedProperty( QgsSymbolLayerV2::EXPR_COLOR, *context, QVariant(), &ok ).toString();
if ( ok )
bc = QgsSymbolLayerV2Utils::decodeColor( colorString );
}
if ( hasDataDefinedProperty( QgsSymbolLayerV2::EXPR_COLOR_BORDER ) )
if ( context && hasDataDefinedProperty( QgsSymbolLayerV2::EXPR_COLOR_BORDER ) )
{
context->setOriginalValueVariable( QgsSymbolLayerV2Utils::encodeColor( pc ) );
QString colorString = evaluateDataDefinedProperty( QgsSymbolLayerV2::EXPR_COLOR_BORDER, *context, QVariant(), &ok ).toString();
@@ -895,7 +895,7 @@ bool QgsSimpleMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitSc
}

QString name( mName );
if ( hasDataDefinedProperty( QgsSymbolLayerV2::EXPR_NAME ) )
if ( context && hasDataDefinedProperty( QgsSymbolLayerV2::EXPR_NAME ) )
{
context->setOriginalValueVariable( mName );
name = evaluateDataDefinedProperty( QgsSymbolLayerV2::EXPR_NAME, *context, QVariant(), &ok ).toString();

0 comments on commit ae0d377

Please sign in to comment.
You can’t perform that action at this time.