Skip to content

Commit 2940af3

Browse files
authored
Merge pull request #842 from 1hitsong/rokuCrash
Fix possible crash when pressing back on the home screen
2 parents 21d004e + 8a67cd2 commit 2940af3

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

components/home/Home.bs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,12 @@ function onKeyEvent(key as string, press as boolean) as boolean
312312
' If the user hit back and is not on the first item of the row,
313313
' assume they want to go to the first item of the row.
314314
' Otherwise, they are exiting the app.
315-
if isStringEqual(key, KeyCode.BACK) and m.homeRows.rowItemFocused[1] > 0
316-
m.homeRows.jumpToRowItem = [m.homeRows.rowItemFocused[0], 0]
317-
return true
315+
if isStringEqual(key, KeyCode.BACK)
316+
rowItemFocused = chainLookupReturn(m.homeRows, "rowItemFocused", [0, 0])
317+
if rowItemFocused[1] > 0
318+
m.homeRows.jumpToRowItem = [rowItemFocused[0], 0]
319+
return true
320+
end if
318321
end if
319322

320323
if isStringEqual(key, KeyCode.OPTIONS)

source/static/whatsNew/3.1.9.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@
1414
{
1515
"description": "Fix the media segment skip button not showing after back button dismissal",
1616
"author": "VTRunner"
17+
},
18+
{
19+
"description": "Fix possible crash when pressing back on the home screen",
20+
"author": "1hitsong"
1721
}
18-
]
22+
]

0 commit comments

Comments
 (0)