Skip to content

Commit

Permalink
Fix potential crash on destroying QgsMapCanvas
Browse files Browse the repository at this point in the history
If an active job is rendering when a map canvas is destroyed
then the canvas can crash
  • Loading branch information
nyalldawson committed Mar 8, 2017
1 parent 3f1cd69 commit 3210fcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -213,8 +213,8 @@ QgsMapCanvas::~QgsMapCanvas()

if ( mJob )
{
mJob->cancel();
Q_ASSERT( !mJob );
whileBlocking( mJob )->cancel();
delete mJob;
}

delete mCache;
Expand Down

0 comments on commit 3210fcc

Please sign in to comment.