Skip to content

Commit

Permalink
Fix leak in variable editor
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 28, 2015
1 parent 40f4f20 commit c24192b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gui/qgsvariableeditorwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ QgsVariableEditorWidget::QgsVariableEditorWidget( QWidget *parent )
connect( mTreeWidget, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
connect( mTreeWidget, SIGNAL( scopeChanged() ), this, SIGNAL( scopeChanged() ) );

setContext( new QgsExpressionContext() );
//setContext clones context
QgsExpressionContext* context = new QgsExpressionContext();
setContext( context );
delete context;
}

QgsVariableEditorWidget::~QgsVariableEditorWidget()
Expand Down

0 comments on commit c24192b

Please sign in to comment.