Skip to content

Commit

Permalink
Merge pull request #1938 from manisandro/dangling
Browse files Browse the repository at this point in the history
Don't keep dangling pointers in QgisApp::mPrintComposers
  • Loading branch information
nyalldawson committed Mar 6, 2015
2 parents 37a7831 + 88e1d7a commit 0be193d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -5667,7 +5667,7 @@ bool QgisApp::loadComposersFromProject( const QDomDocument& doc )
void QgisApp::deletePrintComposers() void QgisApp::deletePrintComposers()
{ {
QSet<QgsComposer*>::iterator it = mPrintComposers.begin(); QSet<QgsComposer*>::iterator it = mPrintComposers.begin();
for ( ; it != mPrintComposers.end(); ++it ) while ( it != mPrintComposers.end() )
{ {
emit composerWillBeRemoved(( *it )->view() ); emit composerWillBeRemoved(( *it )->view() );


Expand All @@ -5683,8 +5683,8 @@ void QgisApp::deletePrintComposers()
{ {
delete composition; delete composition;
} }
it = mPrintComposers.erase( it );
} }
mPrintComposers.clear();
mLastComposerId = 0; mLastComposerId = 0;
markDirty(); markDirty();
} }
Expand Down

0 comments on commit 0be193d

Please sign in to comment.