add validation check for group.optionsAvailable

fixes crash when pressing back during initial video buffering
This commit is contained in:
Alex Wardle 2022-12-23 08:35:40 -07:00
parent 2c3a7b1f33
commit 07bc24b51a

View File

@ -11,7 +11,7 @@ function onKeyEvent(key as string, press as boolean) as boolean
return true
else if key = "options"
group = m.global.sceneManager.callFunc("getActiveScene")
if group <> invalid and group.optionsAvailable
if group <> invalid and group.optionsAvailable <> invalid and group.optionsAvailable
group.lastFocus = group.focusedChild
panel = group.findNode("options")
panel.visible = true