Skip to content

Commit

Permalink
Fix null check issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cubicgraphics committed May 8, 2024
1 parent 10ed37b commit 9eebd2c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ private bool PlayerMapCheck(IPlayer p)
{
if(p.BeatmapIdentifier == null) return false;
//If no map hash then treat as base game map for compat reasons and while waiting for a packet
var Passed = p.SelectedBeatmapPacket != null && string.IsNullOrEmpty(p.SelectedBeatmapPacket.levelHash);
var Passed = p.SelectedBeatmapPacket != null && !string.IsNullOrEmpty(p.SelectedBeatmapPacket.levelHash);
//If not passed, then we have difficulties, and if we have the diff we are looking for, then we can check it for requirements.
if (!Passed && p.SelectedBeatmapPacket!.requirements.TryGetValue((uint)p.BeatmapIdentifier!.Difficulty, out string[]? Requirements))
Passed = !(!_configuration.AllowChroma && Requirements.Contains("Chroma")) || !(!_configuration.AllowMappingExtensions && Requirements.Contains("Mapping Extensions")) || !(!_configuration.AllowNoodleExtensions && Requirements.Contains("Noodle Extensions"));
Expand Down

0 comments on commit 9eebd2c

Please sign in to comment.