1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 19:12:57 +08:00

Fix null reference in tests during attempted ruleset filtering

This commit is contained in:
Dean Herbert 2022-02-22 00:14:33 +09:00
parent c7e9cf904b
commit 2aa0364092

View File

@ -77,7 +77,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
{
bool matchingFilter = true;
matchingFilter &= criteria.Ruleset == null || r.Room.PlaylistItemStats.Value.RulesetIDs.Any(id => id == criteria.Ruleset.OnlineID);
matchingFilter &= criteria.Ruleset == null || r.Room.PlaylistItemStats.Value?.RulesetIDs.Any(id => id == criteria.Ruleset.OnlineID) != false;
if (!string.IsNullOrEmpty(criteria.SearchString))
matchingFilter &= r.FilterTerms.Any(term => term.Contains(criteria.SearchString, StringComparison.InvariantCultureIgnoreCase));