jellyfin / jellyfin-roku

The Official Roku Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
453 stars 143 forks source link

Fix app crashes when refreshing episode list view #1837

Closed cewert closed 4 months ago

cewert commented 4 months ago

Ensure data is valid before using to prevent app crash. This comes from the roku crash log and fixes numbers 2 and 3 on this list:

roku-208-crashlog

Crashlog:

'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in pkg:/source/Main.brs(210) 

'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in pkg:/source/Main.brs(211) 

210 points to this line after running build-prod on 2.0.8:

for i = 0 to currentScene.objects.Items.count() - 1

211 points to this line after running build-prod on 2.0.8:

if LCase(currentScene.objects.Items[i].id) = LCase(currentEpisode.id)

Issues

Introduced in #1749 Ref #1164