mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-20 07:52:30 +02:00
* Check for sidebar item actually having an underlying source before accessing it.
This commit is contained in:
parent
f7246b5830
commit
5d1f0dd360
@ -88,7 +88,7 @@ SourceDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex&
|
||||
if ( type == SourcesModel::Collection || type == SourcesModel::ScriptCollection )
|
||||
{
|
||||
SourceItem* colItem = qobject_cast< SourceItem* >( item );
|
||||
return QSize( option.rect.width(), colItem->source()->isLocal() ? 0 : option.fontMetrics.height() * 3.0 );
|
||||
return QSize( option.rect.width(), ( colItem->source() && colItem->source()->isLocal() ) ? 0 : option.fontMetrics.height() * 3.0 );
|
||||
}
|
||||
else if ( type == SourcesModel::Divider )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user