if ( p_temp_item )
{
+ int i;
vlc_mutex_lock( &p_playlist->object_lock );
+
+ /* Since outlineView: willDisplayCell:... may call this function with
+ p_items that don't exist anymore, first check if the item is still
+ in the playlist. Any cleaner solution welcomed. */
+
+ for ( i = 0 ; i < p_playlist->i_all_size ; i++ )
+ {
+ if( p_playlist->pp_all_items[i] == p_item ) break;
+ else if ( i == p_playlist->i_all_size - 1 )
+ {
+ vlc_object_release( p_playlist );
+ vlc_mutex_unlock( &p_playlist->object_lock );
+ return NO;
+ }
+ }
+
while( p_temp_item->i_parents > 0 )
{
- int i;
for( i = 0; i < p_temp_item->i_parents ; i++ )
{
if( p_temp_item->pp_parents[i]->i_view == i_current_view )
{
if( p_temp_item->pp_parents[i]->p_parent == p_node )
{
- vlc_object_release( p_playlist );
vlc_mutex_unlock( &p_playlist->object_lock );
+ vlc_object_release( p_playlist );
return YES;
}
else
}
}
}
+ vlc_mutex_unlock( &p_playlist->object_lock );
}
- vlc_mutex_unlock( &p_playlist->object_lock );
}
vlc_object_release( p_playlist );
playlist_item_t * p_item;
o_number = [o_to_delete lastObject];
i_row = [o_number intValue];
-
[o_to_delete removeObject: o_number];
[o_outline_view deselectRow: i_row];
// if current item is in selected node and is playing then stop playlist
playlist_Stop( p_playlist );
}
+ vlc_mutex_lock( &p_playlist->object_lock );
playlist_NodeDelete( p_playlist, p_item, VLC_TRUE, VLC_FALSE );
+ vlc_mutex_unlock( &p_playlist->object_lock );
}
else
{
{
playlist_Stop( p_playlist );
}
- playlist_LockDelete( p_playlist, p_item->input.i_id );
+ vlc_mutex_lock( &p_playlist->object_lock );
+ playlist_Delete( p_playlist, p_item->input.i_id );
+ vlc_mutex_unlock( &p_playlist->object_lock );
}
}
[self playlistUpdated];
o_current_name = [NSString stringWithUTF8String:
p_item->pp_children[i_current]->input.psz_name];
psz_temp = vlc_input_item_GetInfo( &p_item->input ,
- _("Meta-information"),_("Artist") );
+ _("Meta-information"),_("Artist") );
o_current_author = [NSString stringWithUTF8String: psz_temp];
free( psz_temp);
vlc_mutex_unlock( &p_playlist->object_lock );
}
if( o_result != NULL )
{
- for( i = 0 ; i < [o_result count] - 1 ; i++ )
+ for( i = 1 ; i < [o_result count] - 1 ; i++ )
{
[o_outline_view expandItem: [o_outline_dict objectForKey:
[NSString stringWithFormat: @"%p",
{
return;
}
-
+
/* Check whether the selected table column header corresponds to a
sortable table column*/
if( !( o_tc == o_tc_name || o_tc == o_tc_author ) )
{
playlist_t *p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
- playlist_item_t *p_item = (playlist_item_t *)[item pointerValue];
+ playlist_item_t *p_item;
if( !p_playlist ) return;
+ p_item = (playlist_item_t *)[item pointerValue];
if( ( p_item == p_playlist->status.p_item ) ||
( p_item->i_children != 0 &&
[self isItem: p_playlist->status.p_item inNode: p_item] ) )