From 4328318ad93b97173d1c3d438b3cf28a3da53371 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Tue, 1 Oct 2024 13:58:56 -0400 Subject: [PATCH] validate api data to prevent crash when hitting shuffle play from tv show details --- components/tvshows/TVShowDetails.bs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/tvshows/TVShowDetails.bs b/components/tvshows/TVShowDetails.bs index 241845905..f7bd9ad3c 100644 --- a/components/tvshows/TVShowDetails.bs +++ b/components/tvshows/TVShowDetails.bs @@ -181,8 +181,10 @@ end function sub onShuffleEpisodeDataLoaded() m.getShuffleEpisodesTask.unobserveField("data") - m.global.queueManager.callFunc("set", m.getShuffleEpisodesTask.data.items) - m.global.queueManager.callFunc("playQueue") + if isValid(m.getShuffleEpisodesTask.data) + m.global.queueManager.callFunc("set", m.getShuffleEpisodesTask.data.items) + m.global.queueManager.callFunc("playQueue") + end if end sub function onKeyEvent(key as string, press as boolean) as boolean