Don't send a trackchange event at end of playlist. Fixes 'Follow Playlist' on hwcodec at end-of-playlist, including the related null pointer access.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20014 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2009-02-16 00:29:07 +00:00
parent d8ff94121f
commit a2f92c9e17

View file

@ -1051,8 +1051,9 @@ static void track_change(void)
if (num_tracks_in_memory() > 0)
{
remove_current_tag();
send_event(PLAYBACK_EVENT_TRACK_CHANGE, audio_current_track());
update_playlist();
if (is_playing)
send_event(PLAYBACK_EVENT_TRACK_CHANGE, audio_current_track());
}
current_track_counter++;