From b91933b8fd22207a3a62e357844f6d2f6a2d1984 Mon Sep 17 00:00:00 2001 From: da3dsoul Date: Tue, 23 Jan 2024 11:50:17 -0500 Subject: [PATCH] Hopefully fix null pointer in Seasons Filter --- Shoko.Server/Filters/FilterExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shoko.Server/Filters/FilterExtensions.cs b/Shoko.Server/Filters/FilterExtensions.cs index 8eb056a32..5ac06bbb6 100644 --- a/Shoko.Server/Filters/FilterExtensions.cs +++ b/Shoko.Server/Filters/FilterExtensions.cs @@ -31,7 +31,7 @@ public static Filterable ToFilterable(this SVR_AnimeSeries series, ILookup series.GetAnime()?.GetCustomTagsForAnime().Select(a => a.TagName).ToHashSet(StringComparer.InvariantCultureIgnoreCase) ?? new HashSet(), YearsDelegate = () => GetYears(series), - SeasonsDelegate = () => series.GetAnime()?.GetSeasons().ToHashSet(), + SeasonsDelegate = () => series.GetAnime()?.GetSeasons().ToHashSet() ?? new HashSet<(int Year, AnimeSeason Season)>(), HasTvDBLinkDelegate = () => RepoFactory.CrossRef_AniDB_TvDB.GetByAnimeID(series.AniDB_ID).Any(), HasMissingTvDbLinkDelegate = () => HasMissingTvDBLink(series), // expensive, as these are direct @@ -221,7 +221,7 @@ public static Filterable ToFilterable(this SVR_AnimeGroup group, ILookup(parts[0])); - }).ToHashSet(), + }).ToHashSet() ?? new HashSet<(int, AnimeSeason)>(), HasTvDBLinkDelegate = () => series.Any(a => RepoFactory.CrossRef_AniDB_TvDB.GetByAnimeID(a.AniDB_ID).Any()), HasMissingTvDbLinkDelegate = () => HasMissingTvDBLink(group), HasTMDbLinkDelegate =