Skip to content

Commit 3210fcc

Browse files
committed
Fix potential crash on destroying QgsMapCanvas
If an active job is rendering when a map canvas is destroyed then the canvas can crash
1 parent 3f1cd69 commit 3210fcc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gui/qgsmapcanvas.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ QgsMapCanvas::~QgsMapCanvas()
213213

214214
if ( mJob )
215215
{
216-
mJob->cancel();
217-
Q_ASSERT( !mJob );
216+
whileBlocking( mJob )->cancel();
217+
delete mJob;
218218
}
219219

220220
delete mCache;

0 commit comments

Comments
 (0)