QPL_LOCK;
assert( p_item );
- playlist_item_t *p_pref_item = playlist_GetPreferredNode( THEPL, p_item );
- if( p_pref_item ) p_item = p_pref_item;
-
/* needed for popupAdd() */
currentRootId = p_item->i_id;
playlist_Lock( THEPL );
playlist_item_t *p_item = playlist_ItemGetByInput( THEPL, p_input );
- assert( p_item != NULL );
+ if( !p_item )
+ {
+ playlist_Unlock( THEPL );
+ return;
+ }
QModelIndex index = model->index( p_item->i_id, 0 );
+
+ playlist_Unlock( THEPL );
+
if( currentView == iconView ) {
iconView->setRootIndex( index );
locationBar->setIndex( index );
last_activated_id = -1;
- playlist_Unlock( THEPL );
+
}
LocationBar::LocationBar( PLModel *m )