From 87e11cb2d7c538466011c0399a5ac3d31abb585a Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 22 Oct 2015 16:20:34 +1100 Subject: [PATCH] Fix a crash in filtered legends --- src/core/qgsmaphittest.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/qgsmaphittest.cpp b/src/core/qgsmaphittest.cpp index b6764d09fbc..097a99333f9 100644 --- a/src/core/qgsmaphittest.cpp +++ b/src/core/qgsmaphittest.cpp @@ -82,13 +82,15 @@ void QgsMapHitTest::runHitTestLayer( QgsVectorLayer* vl, SymbolV2Set& usedSymbol { Q_FOREACH ( QgsSymbolV2* s, r->originalSymbolsForFeature( f, context ) ) { - usedSymbols.insert( QgsSymbolLayerV2Utils::symbolProperties( s ) ); + if ( s ) + usedSymbols.insert( QgsSymbolLayerV2Utils::symbolProperties( s ) ); } } else { QgsSymbolV2* s = r->originalSymbolForFeature( f, context ); - usedSymbols.insert( QgsSymbolLayerV2Utils::symbolProperties( s ) ); + if ( s ) + usedSymbols.insert( QgsSymbolLayerV2Utils::symbolProperties( s ) ); } } r->stopRender( context );