Skip to content

Commit 9887734

Browse files
committed
don't crash on late update timeouts
(cherry picked from commit 5541ad0)
1 parent e950b7b commit 9887734

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/gui/qgsmapcanvas.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,11 @@ QgsRectangle QgsMapCanvas::imageRect( const QImage &img, const QgsMapSettings &m
640640

641641
void QgsMapCanvas::mapUpdateTimeout()
642642
{
643-
const QImage &img = mJob->renderedImage();
644-
mMap->setContent( img, imageRect( img, mSettings ) );
643+
if ( mJob )
644+
{
645+
const QImage &img = mJob->renderedImage();
646+
mMap->setContent( img, imageRect( img, mSettings ) );
647+
}
645648
}
646649

647650
void QgsMapCanvas::stopRendering()

0 commit comments

Comments
 (0)