From 2f302802754dd14eb3d702c84f3fa124c90b3bd3 Mon Sep 17 00:00:00 2001 From: Jimi Date: Tue, 8 Oct 2024 07:22:52 -0600 Subject: [PATCH] Fix 2.1.6 crash --- components/ItemGrid/LoadVideoContentTask.bs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/ItemGrid/LoadVideoContentTask.bs b/components/ItemGrid/LoadVideoContentTask.bs index 2142477c3..fdbddfa6e 100644 --- a/components/ItemGrid/LoadVideoContentTask.bs +++ b/components/ItemGrid/LoadVideoContentTask.bs @@ -87,7 +87,9 @@ sub LoadItems_AddVideoContent(video as object, mediaSourceId as dynamic, audio_s video.length = meta.json.MediaSources[0].RunTimeTicks / 10000000 end if end if - video.MaxVideoDecodeResolution = [meta.json.MediaSources[0].MediaStreams[0].Width, meta.json.MediaSources[0].MediaStreams[0].Height] + if isValid(meta.json.MediaSources[0]) and isValid(meta.json.MediaSources[0].MediaStreams[0]) + video.MaxVideoDecodeResolution = [meta.json.MediaSources[0].MediaStreams[0].Width, meta.json.MediaSources[0].MediaStreams[0].Height] + end if subtitle_idx = m.top.selectedSubtitleIndex videotype = LCase(meta.type)