diff --git a/Themes/default/BGAnimations/ScreenGameplay overlay.lua b/Themes/default/BGAnimations/ScreenGameplay overlay.lua index 35cb2aebc6..7056d62c0a 100644 --- a/Themes/default/BGAnimations/ScreenGameplay overlay.lua +++ b/Themes/default/BGAnimations/ScreenGameplay overlay.lua @@ -5,7 +5,7 @@ local function UpdateTime(self) local vStats = STATSMAN:GetCurStageStats():GetPlayerStageStats( pn ); local vTime; local obj = self:GetChild( string.format("RemainingTime" .. PlayerNumberToString(pn) ) ); - if vStats then + if vStats and obj then vTime = vStats:GetLifeRemainingSeconds() obj:settext( SecondsToMMSSMsMs( vTime ) ); end; @@ -37,4 +37,4 @@ if GAMESTATE:GetCurrentCourse() then end; end; --]] t.InitCommand=cmd(SetUpdateFunction,UpdateTime); -return t \ No newline at end of file +return t