Skip to content

Commit

Permalink
Don't keep dangling pointers in QgisApp::mPrintComposers
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro authored and nyalldawson committed Mar 28, 2015
1 parent 481b192 commit c278869
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -5654,7 +5654,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 @@ -5670,8 +5670,8 @@ void QgisApp::deletePrintComposers()
{
delete composition;
}
it = mPrintComposers.erase( it );
}
mPrintComposers.clear();
mLastComposerId = 0;
markDirty();
}
Expand Down

0 comments on commit c278869

Please sign in to comment.