From 0665ad5d9a15e51865118b90f95f8637ef99415b Mon Sep 17 00:00:00 2001 From: Victor Chelaru Date: Mon, 27 Nov 2023 11:58:11 -0700 Subject: [PATCH] Added try/catch when doing an update. This may cause an exception if the window isn't visible yet, no biggie. --- FRBDK/Glue/OfficialPlugins/FrbUpdater/UpdateWindow.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/FRBDK/Glue/OfficialPlugins/FrbUpdater/UpdateWindow.cs b/FRBDK/Glue/OfficialPlugins/FrbUpdater/UpdateWindow.cs index 19a546d01..ee24f37a5 100644 --- a/FRBDK/Glue/OfficialPlugins/FrbUpdater/UpdateWindow.cs +++ b/FRBDK/Glue/OfficialPlugins/FrbUpdater/UpdateWindow.cs @@ -284,7 +284,14 @@ private async void DoDownloadAndSaveFile(FileData fileData, Uri url, HttpWebResp }; - lblSpeed.Invoke(updateDelegate); + try + { + lblSpeed.Invoke(updateDelegate); + } + catch(InvalidOperationException) + { + // do nothing, at times this can happen before the view is visible. It's okay, just carry on... + } }