Skip to content

Commit

Permalink
Don't crash tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Nov 28, 2019
1 parent be7d4a4 commit 82a21fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GUI/MainModList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1049,9 +1049,9 @@ private static bool IsModInFilter(GUIModFilter filter, ModuleLabel label, GUIMod
if (filter != GUIModFilter.CustomLabel)
{
// "Hide" labels apply to all non-custom filters
if (Main.Instance.mainModList.ModuleLabels.Labels
if (Main.Instance?.mainModList.ModuleLabels.Labels
.Where(l => l.Hide)
.Any(l => l.ModuleIdentifiers.Contains(m.Identifier)))
.Any(l => l.ModuleIdentifiers.Contains(m.Identifier)) ?? false)
{
return false;
}
Expand Down

0 comments on commit 82a21fd

Please sign in to comment.