Add fallback to allow FilterCriteria to run without a ruleset being set.

This commit is contained in:
Dean Herbert 2017-04-18 10:55:45 +09:00
parent 5939ba9143
commit 8ef675d9b3
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -23,7 +23,7 @@ namespace osu.Game.Screens.Select
{
var set = g.BeatmapSet;
bool hasCurrentMode = set.Beatmaps.Any(bm => bm.RulesetID == Ruleset.ID);
bool hasCurrentMode = set.Beatmaps.Any(bm => bm.RulesetID == (Ruleset?.ID ?? 0));
bool match = hasCurrentMode;