From 884802459fbaa0ac0554d7764ba5907ac6f56e4a Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Mon, 31 Jul 2023 00:40:02 -0400 Subject: [PATCH] Fix #760 --- TwitchDownloaderWPF/PageVodDownload.xaml.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TwitchDownloaderWPF/PageVodDownload.xaml.cs b/TwitchDownloaderWPF/PageVodDownload.xaml.cs index ccd05774..ef37d9d2 100644 --- a/TwitchDownloaderWPF/PageVodDownload.xaml.cs +++ b/TwitchDownloaderWPF/PageVodDownload.xaml.cs @@ -92,6 +92,12 @@ private async Task GetVideoInfo() Task taskVideoInfo = TwitchHelper.GetVideoInfo(videoId); Task taskAccessToken = TwitchHelper.GetVideoToken(videoId, TextOauth.Text); await Task.WhenAll(taskVideoInfo, taskAccessToken); + + if (taskAccessToken.Result.data.videoPlaybackAccessToken is null) + { + throw new NullReferenceException("Invalid VOD, deleted/expired VOD possibly?"); + } + Task taskPlaylist = TwitchHelper.GetVideoPlaylist(videoId, taskAccessToken.Result.data.videoPlaybackAccessToken.value, taskAccessToken.Result.data.videoPlaybackAccessToken.signature); try {