diff --git a/Wabbajack/View Models/UserInterventionHandlers.cs b/Wabbajack/View Models/UserInterventionHandlers.cs index d9844b92..8b7606b2 100644 --- a/Wabbajack/View Models/UserInterventionHandlers.cs +++ b/Wabbajack/View Models/UserInterventionHandlers.cs @@ -297,11 +297,12 @@ namespace Wabbajack public void OnDownloadUpdated(IWebBrowser chromiumWebBrowser, IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback) { - if (_archive?.Size != 0 && downloadItem.TotalBytes != _archive?.Size) + if (_archive?.Size != null && _archive?.Size != 0 && downloadItem.TotalBytes != _archive?.Size) { - _tcs.SetCanceled(); + _tcs.TrySetCanceled(); Utils.Error( $"Download of {_archive!.Name} (from {downloadItem.OriginalUrl}) aborted, selected file was {downloadItem.TotalBytes.ToFileSizeString()} expected size was {_archive!.Size.ToFileSizeString()}"); + callback.Cancel(); return; }