Skip to content

Commit

Permalink
Fix leak in QgsComposer
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 28, 2015
1 parent a8f85fb commit 95816f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/composer/qgscomposer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,7 @@ void QgsComposer::setComposition( QgsComposition* composition )

deleteItemWidgets();

delete mComposition;
mComposition = composition;

connectCompositionSlots();
Expand Down Expand Up @@ -3251,6 +3252,9 @@ void QgsComposer::readXML( const QDomElement& composerElem, const QDomDocument&
QgsCompositionWidget* oldCompositionWidget = qobject_cast<QgsCompositionWidget *>( mGeneralDock->widget() );
delete oldCompositionWidget;

deleteItemWidgets();
delete mComposition;

createComposerView();

//read composition settings
Expand Down

0 comments on commit 95816f5

Please sign in to comment.