diff --git a/scripts/songselect/songwheel.lua b/scripts/songselect/songwheel.lua index 3efcb8d..60a8e93 100644 --- a/scripts/songselect/songwheel.lua +++ b/scripts/songselect/songwheel.lua @@ -775,7 +775,6 @@ function drawScrollbar() gfx.ImageRect(fillXPos, scrollbarYPos, sw, sh, scrollBarFillImage, 1, 0); -- 1st letter of song title on scroll - local letter = string.upper(common.firstLetter(songwheel.songs[selectedIndex].title)); gfx.BeginPath() gfx.FontSize(16) gfx.LoadSkinFont('Digital-Serial-Bold.ttf') @@ -784,8 +783,10 @@ function drawScrollbar() gfx.Fill() gfx.FillColor(255,255,255) gfx.TextAlign(gfx.TEXT_ALIGN_MIDDLE + gfx.TEXT_ALIGN_CENTER) + if (songwheel.songs[selectedIndex] ~= nil) then + local letter = string.upper(common.firstLetter(songwheel.songs[selectedIndex].title)); gfx.Text(letter, fillXPos-10, scrollbarYPos + 5); - + end end function refreshIrLeaderboard(deltaTime)