Fix a lack of return on error for check_new_track (rare condition)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9661 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Brandon Low 2006-04-14 14:19:56 +00:00
parent 0291a6e200
commit fb966b3cf8

View file

@ -789,11 +789,17 @@ static void audio_check_new_track(bool require_codec)
if (!playlist_check(new_track))
{
if (new_track >= 0)
{
queue_post(&codec_callback_queue, Q_CODEC_REQUEST_FAILED, 0);
return;
}
/* Find the beginning backward if the user over-skips it */
while (!playlist_check(++new_track))
if (new_track >= 0)
{
queue_post(&codec_callback_queue, Q_CODEC_REQUEST_FAILED, 0);
return;
}
}
/* Update the playlist */
last_peek_offset -= new_track;