Skip to content

Commit

Permalink
Fix deletion of QObject from non main thread
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 30, 2017
1 parent 45538df commit 233a861
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/qgsmaprenderertask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ bool QgsMapRendererTask::run()
annotation->render( context );
context.painter()->restore();
}
qDeleteAll( mAnnotations );
mAnnotations.clear();

if ( !mFileName.isEmpty() )
{
Expand Down Expand Up @@ -181,6 +179,9 @@ bool QgsMapRendererTask::run()

void QgsMapRendererTask::finished( bool result )
{
qDeleteAll( mAnnotations );
mAnnotations.clear();

if ( result )
emit renderingComplete();
else
Expand Down

0 comments on commit 233a861

Please sign in to comment.