Skip to content

Commit c24192b

Browse files
committedAug 28, 2015
Fix leak in variable editor
1 parent 40f4f20 commit c24192b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/gui/qgsvariableeditorwidget.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ QgsVariableEditorWidget::QgsVariableEditorWidget( QWidget *parent )
8888
connect( mTreeWidget, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
8989
connect( mTreeWidget, SIGNAL( scopeChanged() ), this, SIGNAL( scopeChanged() ) );
9090

91-
setContext( new QgsExpressionContext() );
91+
//setContext clones context
92+
QgsExpressionContext* context = new QgsExpressionContext();
93+
setContext( context );
94+
delete context;
9295
}
9396

9497
QgsVariableEditorWidget::~QgsVariableEditorWidget()

0 commit comments

Comments
 (0)
Please sign in to comment.