Possible fix for nil value.
This commit is contained in:
@@ -98,11 +98,12 @@ function GetRandomSongBackground()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function GetSongBackground()
|
function GetSongBackground()
|
||||||
local Path = GAMESTATE:GetCurrentSong():GetBackgroundPath()
|
local song = GAMESTATE:GetCurrentSong()
|
||||||
if not Path then
|
if song then
|
||||||
return THEME:GetPathG("Common","fallback background")
|
local path = song:GetBackgroundPath()
|
||||||
|
if path then return path end
|
||||||
end
|
end
|
||||||
return Path
|
return THEME:GetPathG("Common","fallback background")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- (c) 2005 Glenn Maynard, Chris Danford
|
-- (c) 2005 Glenn Maynard, Chris Danford
|
||||||
|
|||||||
Reference in New Issue
Block a user