summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/music_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/music_gui.cpp b/src/music_gui.cpp
index ec2999c95..94e3f191b 100644
--- a/src/music_gui.cpp
+++ b/src/music_gui.cpp
@@ -84,7 +84,8 @@ static byte * const _playlists[] = {
void ValidatePlaylist(byte *playlist)
{
while (*playlist != 0) {
- if (*playlist <= BaseMusic::GetUsedSet()->num_available) {
+ /* Song indices are saved off-by-one so 0 is "nothing". */
+ if (*playlist <= NUM_SONGS_AVAILABLE && !StrEmpty(GetSongName(*playlist - 1))) {
playlist++;
continue;
}