Skip to content

Commit

Permalink
Hopefully fix nullpointer on PopulateInitialData
Browse files Browse the repository at this point in the history
  • Loading branch information
da3dsoul committed Dec 22, 2017
1 parent 09603be commit 452ce42
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Shoko.Server/Models/SVR_GroupFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ public bool EvaluateGroupFilter(CL_AnimeGroup_User contractGroup, JMMUser curUse
if ((FilterType & (int) GroupFilterType.Directory) == (int) GroupFilterType.Directory)
return false;

if (contractGroup?.Stat_AllTags == null) return false;

if (curUser?.GetHideCategories().FindInEnumerable(contractGroup.Stat_AllTags) ?? false) return false;

// sub groups don't count
Expand Down Expand Up @@ -857,6 +859,8 @@ public bool EvaluateGroupFilter(CL_AnimeSeries_User contractSerie, JMMUser curUs
if ((FilterType & (int) GroupFilterType.Directory) == (int) GroupFilterType.Directory)
return false;

if (contractSerie?.AniDBAnime?.AniDBAnime == null) return false;

if (curUser?.GetHideCategories().FindInEnumerable(contractSerie.AniDBAnime.AniDBAnime.GetAllTags()) ??
false)
return false;
Expand Down

0 comments on commit 452ce42

Please sign in to comment.