From 322490d0b2910b66c4b0d470796227077e0439d6 Mon Sep 17 00:00:00 2001 From: Frog Date: Mon, 16 Mar 2026 22:58:00 -0700 Subject: [PATCH] Additional Changes to Correct Null Exception for #12 - Additional changes to prevent Null Exception when catalog mapping property is null. --- CreamInstaller/Platforms/Epic/EpicStore.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CreamInstaller/Platforms/Epic/EpicStore.cs b/CreamInstaller/Platforms/Epic/EpicStore.cs index ebda557..0655fea 100644 --- a/CreamInstaller/Platforms/Epic/EpicStore.cs +++ b/CreamInstaller/Platforms/Epic/EpicStore.cs @@ -64,7 +64,7 @@ internal static class EpicStore foreach (Element element in searchStore) { string title = element.Title; - string product = element.CatalogNs is not null && element.CatalogNs.Mappings.Length > 0 + string product = element.CatalogNs?.Mappings is { Length: > 0 } ? element.CatalogNs.Mappings.First().PageSlug : null; string icon = null; @@ -85,7 +85,7 @@ internal static class EpicStore foreach (Element element in catalogOffers) { string title = element.Title; - string product = element.CatalogNs is not null && element.CatalogNs.Mappings.Length > 0 + string product = element.CatalogNs?.Mappings is { Length: > 0 } ? element.CatalogNs.Mappings.First().PageSlug : null; string icon = null;