mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 17:43:59 +02:00
* Should fix crash when filtering collection.
This commit is contained in:
@@ -205,16 +205,20 @@ TreeProxyModel::filterAcceptsRow( int sourceRow, const QModelIndex& sourceParent
|
||||
PlayableItem* ti = sourceModel()->itemFromIndex( sourceModel()->index( i, 0, sourceParent ) );
|
||||
|
||||
if ( ti->name() == item->name() &&
|
||||
( ti->result()->albumpos() == item->result()->albumpos() || ti->result()->albumpos() == 0 || item->result()->albumpos() == 0 ) )
|
||||
( ti->result()->albumpos() == item->result()->albumpos() ||
|
||||
ti->result()->albumpos() == 0 || item->result()->albumpos() == 0 ) )
|
||||
{
|
||||
if ( !item->result()->isOnline() && ti->result()->isOnline() )
|
||||
return false;
|
||||
|
||||
if ( !item->result()->collection()->source()->isLocal() && ti->result()->collection()->source()->isLocal() )
|
||||
if ( ( item->result()->collection().isNull() || !item->result()->collection()->source()->isLocal() ) &&
|
||||
!ti->result()->collection().isNull() && ti->result()->collection()->source()->isLocal() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool accepted = false;
|
||||
if ( m_filter.isEmpty() )
|
||||
|
Reference in New Issue
Block a user