1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-01-17 22:38:33 +01:00

be careful

This commit is contained in:
Leo Franchi 2011-08-01 11:39:03 -04:00
parent de508c049b
commit ea69fe158a

View File

@ -196,6 +196,9 @@ CollectionItem::playlistDeletedInternal( SourceTreeItem* parent, const T& p )
if( parent->children().isEmpty() && parent->parent() ) // Don't leave an empty Playlist or Station category
{
int idx = parent->parent()->children().indexOf( parent );
if( idx < 0 )
return;
parent->parent()->beginRowsRemoved( idx, idx );
parent->parent()->removeChild( parent );
parent->parent()->endRowsRemoved();