Skip to content
Permalink
Browse files

Fix crashes when accessing null map layer renderer

(obviously cached layers have null renderer)

Thanks @nyalldawson for tracking it down
  • Loading branch information
wonder-sk committed Aug 4, 2016
1 parent 669ac1b commit 23909a123ac34b68d0e9e7163fceda1e440753c9
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/core/qgsmaprenderercustompainterjob.cpp
  2. +1 −1 src/core/qgsmaprendererparalleljob.cpp
@@ -125,7 +125,7 @@ void QgsMapRendererCustomPainterJob::cancel()
for ( LayerRenderJobs::iterator it = mLayerJobs.begin(); it != mLayerJobs.end(); ++it )
{
it->context.setRenderingStopped( true );
if ( it->renderer->feedback() )
if ( it->renderer && it->renderer->feedback() )
it->renderer->feedback()->cancel();
}

@@ -92,7 +92,7 @@ void QgsMapRendererParallelJob::cancel()
for ( LayerRenderJobs::iterator it = mLayerJobs.begin(); it != mLayerJobs.end(); ++it )
{
it->context.setRenderingStopped( true );
if ( it->renderer->feedback() )
if ( it->renderer && it->renderer->feedback() )
it->renderer->feedback()->cancel();
}

0 comments on commit 23909a1

Please sign in to comment.
You can’t perform that action at this time.