Skip to content
Permalink
Browse files

Categorized renderer: fix memory leak

  • Loading branch information
m-kuhn committed Jan 9, 2014
1 parent 6175f24 commit 63ba802e059bad37289d58931a22b82acf0b8a51
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/symbology-ng/qgscategorizedsymbolrendererv2.cpp
@@ -142,6 +142,7 @@ QgsCategorizedSymbolRendererV2::QgsCategorizedSymbolRendererV2( QString attrName
mSourceColorRamp( NULL ),
mInvertedColorRamp( false ),
mScaleMethod( DEFAULT_SCALE_METHOD ),
mExpression( 0 ),
mRotationFieldIdx( -1 ),
mSizeScaleFieldIdx( -1 )
{
@@ -199,8 +200,9 @@ QgsSymbolV2* QgsCategorizedSymbolRendererV2::symbolForFeature( QgsFeature& featu
{
const QgsAttributes& attrs = feature.attributes();
QVariant value;
if ( mAttrNum < 0 || mAttrNum >= attrs.count() )
if ( mAttrNum == -1 )
{
Q_ASSERT( mExpression );
value = mExpression->evaluate( &feature );
}
else
@@ -406,6 +408,7 @@ void QgsCategorizedSymbolRendererV2::stopRender( QgsRenderContext& context )
delete it2.value();
}
mTempSymbols.clear();
delete mExpression;
}

QList<QString> QgsCategorizedSymbolRendererV2::usedAttributes()

0 comments on commit 63ba802

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