diff --git a/CreamInstaller/Platforms/Epic/EpicStore.cs b/CreamInstaller/Platforms/Epic/EpicStore.cs index 4092277..ebda557 100644 --- a/CreamInstaller/Platforms/Epic/EpicStore.cs +++ b/CreamInstaller/Platforms/Epic/EpicStore.cs @@ -58,9 +58,9 @@ internal static class EpicStore cacheFile.DeleteFile(); } - if (response is null) + if (response is null || response.Data?.Catalog is null) return dlcIds; - List searchStore = [..response.Data.Catalog.SearchStore.Elements]; + List searchStore = [..response.Data.Catalog.SearchStore?.Elements ?? []]; foreach (Element element in searchStore) { string title = element.Title; @@ -81,7 +81,7 @@ internal static class EpicStore dlcIds.Populate(item.Id, title, product, icon, null, element.Items.Length == 1); } - List catalogOffers = [..response.Data.Catalog.CatalogOffers.Elements]; + List catalogOffers = [..response.Data.Catalog.CatalogOffers?.Elements ?? []]; foreach (Element element in catalogOffers) { string title = element.Title; @@ -118,6 +118,7 @@ internal static class EpicStore (string id, string name, string product, string icon, string developer) app = dlcIds[i]; if (app.id != id) continue; + found = true; dlcIds[i] = canOverwrite ? (app.id, title ?? app.name, product ?? app.product, icon ?? app.icon, developer ?? app.developer)