From 4f9cf2be6babedad08075fbc8e6882aa82a6bf5b Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sat, 7 Dec 2024 05:31:37 -0600 Subject: [PATCH] Attempt #2 --- src/Ryujinx.UI.Common/App/ApplicationLibrary.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx.UI.Common/App/ApplicationLibrary.cs b/src/Ryujinx.UI.Common/App/ApplicationLibrary.cs index a750db997..cb6467f5e 100644 --- a/src/Ryujinx.UI.Common/App/ApplicationLibrary.cs +++ b/src/Ryujinx.UI.Common/App/ApplicationLibrary.cs @@ -1079,10 +1079,12 @@ namespace Ryujinx.UI.App.Common private bool AddAndAutoSelectUpdate(TitleUpdateModel update) { + if (update == null) return false; + var currentlySelected = TitleUpdates.Items.FindFirst(it => it.TitleUpdate.TitleIdBase == update.TitleIdBase && it.IsSelected); - var shouldSelect = currentlySelected.Check(curr => curr.TitleUpdate.Version < update.Version); + var shouldSelect = currentlySelected.Check(curr => curr.TitleUpdate?.Version < update.Version); _titleUpdates.AddOrUpdate((update, shouldSelect)); @@ -1485,7 +1487,7 @@ namespace Ryujinx.UI.App.Common if (!savedUpdateLookup.Contains(update)) { bool shouldSelect = false; - if (selectedUpdate.Check(su => su.Update.Version < update.Version)) + if (selectedUpdate.Check(su => su.Update?.Version < update.Version)) { shouldSelect = true; _titleUpdates.AddOrUpdate((selectedUpdate.Value.Update, false));