Fix beatmap lookups failing for beatmaps with no local path

Turns out the underlying EscapeUriString doesn't like nulls
This commit is contained in:
Dean Herbert 2019-11-23 20:54:01 +09:00
parent 4063135a3a
commit 65d71b9442

View File

@ -15,6 +15,6 @@ namespace osu.Game.Online.API.Requests
this.beatmap = beatmap;
}
protected override string Target => $@"beatmaps/lookup?id={beatmap.OnlineBeatmapID}&checksum={beatmap.MD5Hash}&filename={System.Uri.EscapeUriString(beatmap.Path)}";
protected override string Target => $@"beatmaps/lookup?id={beatmap.OnlineBeatmapID}&checksum={beatmap.MD5Hash}&filename={System.Uri.EscapeUriString(beatmap.Path ?? string.Empty)}";
}
}