Fix a crash in filtered legends

This commit is contained in:
Nyall Dawson 2015-10-22 16:20:34 +11:00
parent b4b7017068
commit 87e11cb2d7

View File

@ -82,13 +82,15 @@ void QgsMapHitTest::runHitTestLayer( QgsVectorLayer* vl, SymbolV2Set& usedSymbol
{ {
Q_FOREACH ( QgsSymbolV2* s, r->originalSymbolsForFeature( f, context ) ) Q_FOREACH ( QgsSymbolV2* s, r->originalSymbolsForFeature( f, context ) )
{ {
usedSymbols.insert( QgsSymbolLayerV2Utils::symbolProperties( s ) ); if ( s )
usedSymbols.insert( QgsSymbolLayerV2Utils::symbolProperties( s ) );
} }
} }
else else
{ {
QgsSymbolV2* s = r->originalSymbolForFeature( f, context ); QgsSymbolV2* s = r->originalSymbolForFeature( f, context );
usedSymbols.insert( QgsSymbolLayerV2Utils::symbolProperties( s ) ); if ( s )
usedSymbols.insert( QgsSymbolLayerV2Utils::symbolProperties( s ) );
} }
} }
r->stopRender( context ); r->stopRender( context );