Commit 871412c6 authored by Rafaël Carré's avatar Rafaël Carré

Fix segfault when nothing is playing

parent e0dd7708
......@@ -336,12 +336,13 @@ DBUS_METHOD( GetCurrentTrack )
playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
playlist_item_t* p_tested_item = p_playlist->p_root_onelevel;
while ( p_tested_item && p_tested_item->p_input->i_id !=
if( p_playlist->status.p_item )
while ( p_tested_item && p_tested_item->p_input->i_id !=
p_playlist->status.p_item->p_input->i_id )
{
i_position++;
TEST_NEXT_ITEM;
}
{
i_position++;
TEST_NEXT_ITEM;
}
/* FIXME if p_tested_item is NULL at that point, what do we do ? */
pl_Release( p_playlist );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment