Fix warning causing gameplay skips.

This commit is contained in:
Colby Klein
2010-12-10 11:27:40 -08:00
parent a48b8c5503
commit 75a9bb3eff
@@ -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
return t