ensure vars are valid - fixes crashlog line 516

This commit is contained in:
Charles Ewert 2023-03-02 13:33:54 -05:00
parent a39f52cd51
commit 742c60b910

View File

@ -567,15 +567,18 @@ sub Main (args as dynamic) as void
end if
else if type(msg) = "roDeviceInfoEvent"
event = msg.GetInfo()
group = sceneManager.callFunc("getActiveScene")
if event.exitedScreensaver = true
sceneManager.callFunc("resetTime")
group = sceneManager.callFunc("getActiveScene")
if isValid(group?.subtype())
if group.subtype() = "Home"
currentTime = CreateObject("roDateTime").AsSeconds()
group.timeLastRefresh = currentTime
group.callFunc("refresh")
end if
' todo: add other screens to be refreshed - movie detail, tv series, episode list etc.
end if
else
print "Unhandled roDeviceInfoEvent:"
print msg.GetInfo()