Skip to content
Permalink
Browse files
Don't try to paint onto null icons
  • Loading branch information
nyalldawson committed Aug 18, 2021
1 parent 13b8d2c commit d5058cabc796241d7e3dc3fc26a28b309e83f1d5
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/layertree/qgslayertreemodel.cpp
@@ -254,7 +254,7 @@ QVariant QgsLayerTreeModel::data( const QModelIndex &index, int role ) const
icon = legendIconEmbeddedInParent( nodeLayer );
}

if ( layer->isEditable() && testFlag( UseTextFormatting ) )
if ( !icon.isNull() && layer->isEditable() && testFlag( UseTextFormatting ) )
{
const int iconSize = scaleIconSize( 16 );
QPixmap pixmap( icon.pixmap( iconSize, iconSize ) );

0 comments on commit d5058ca

Please sign in to comment.