Skip to content

Commit e3e42f0

Browse files
committed
fix support for null values in categories (fixes #11786)
1 parent ce95c59 commit e3e42f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/core/symbology-ng/qgscategorizedsymbolrendererv2.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ void QgsCategorizedSymbolRendererV2::rebuildHash()
178178
QgsSymbolV2* QgsCategorizedSymbolRendererV2::symbolForValue( QVariant value )
179179
{
180180
// TODO: special case for int, double
181-
QHash<QString, QgsSymbolV2*>::iterator it = mSymbolHash.find( value.toString() );
181+
QHash<QString, QgsSymbolV2*>::iterator it = mSymbolHash.find( value.isNull() ? "" : value.toString() );
182182
if ( it == mSymbolHash.end() )
183183
{
184184
if ( mSymbolHash.size() == 0 )

0 commit comments

Comments
 (0)