Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #1938 from manisandro/dangling
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()
{
QSet<QgsComposer*>::iterator it = mPrintComposers.begin();
for ( ; it != mPrintComposers.end(); ++it )
while ( it != mPrintComposers.end() )
{
emit composerWillBeRemoved(( *it )->view() );

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

0 comments on commit 0be193d

Please sign in to comment.