Merge pull request #921 from ApexArray/fix-crash-on-invalid-optionsAvailable

Fix crash when pressing options button during initial video buffering
This commit is contained in:
1hitsong 2022-12-31 08:41:42 -05:00 committed by GitHub
commit ad66045c60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

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 isValid(group) and isValid(group.optionsAvailable) and group.optionsAvailable
group.lastFocus = group.focusedChild
panel = group.findNode("options")
panel.visible = true

View File

@ -8,4 +8,5 @@
<field id="exit" type="boolean" alwaysNotify="true" />
</interface>
<script type="text/brightscript" uri="JFScene.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
</component>