ensure vars are valid - fixes crashlog lines 491 + 495

This commit is contained in:
Charles Ewert 2023-03-02 13:23:35 -05:00
parent 9638d2410e
commit a39f52cd51

View File

@ -539,6 +539,7 @@ sub Main (args as dynamic) as void
end if
else if isNodeEvent(msg, "state")
node = msg.getRoSGNode()
if isValid(node?.state)
if m.selectedItemType = "TvChannel" and node.state = "finished"
video = CreateVideoPlayerGroup(node.id)
m.global.sceneManager.callFunc("pushScene", video)
@ -553,7 +554,7 @@ sub Main (args as dynamic) as void
if retryVideo <> invalid
m.global.sceneManager.callFunc("pushScene", retryVideo)
end if
else if node.showID = invalid
else if isValid(node?.showID)
sceneManager.callFunc("popScene")
else
if video.errorMsg = ""
@ -563,6 +564,7 @@ sub Main (args as dynamic) as void
end if
end if
end if
end if
else if type(msg) = "roDeviceInfoEvent"
event = msg.GetInfo()
group = sceneManager.callFunc("getActiveScene")