From 3a2d2f9e01631363385d9d575b84a1e0282de956 Mon Sep 17 00:00:00 2001 From: pointfeev Date: Sat, 20 Apr 2024 14:21:35 -0400 Subject: [PATCH] Fix null exception --- CreamInstaller/Forms/SelectForm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CreamInstaller/Forms/SelectForm.cs b/CreamInstaller/Forms/SelectForm.cs index 33b87c2..c928f09 100644 --- a/CreamInstaller/Forms/SelectForm.cs +++ b/CreamInstaller/Forms/SelectForm.cs @@ -978,7 +978,7 @@ internal sealed partial class SelectForm : CustomForm List<(Platform platform, string gameId, string dlcId)> choices = ProgramData.ReadDlcChoices().ToList(); foreach (SelectionDLC dlc in SelectionDLC.All.Keys) { - dlc.Enabled = choices.Any(c => c.platform == dlc.Selection.Platform && c.gameId == dlc.Selection.Id && c.dlcId == dlc.Id) + dlc.Enabled = choices.Any(c => c.platform == dlc.Selection?.Platform && c.gameId == dlc.Selection?.Id && c.dlcId == dlc.Id) ? dlc.Name == "Unknown" : dlc.Name != "Unknown"; OnTreeViewNodeCheckedChanged(null, new(dlc.TreeNode, TreeViewAction.ByMouse));