mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 19:27:31 +08:00
Merge pull request #11625 from peppy/fix-beatmap-cache-lookup-null-failure
Fix SQLite exception thrown is a beatmap lookup is attempted without an OnlineBeatmapID present
This commit is contained in:
commit
44e88f09e5
@ -160,7 +160,7 @@ namespace osu.Game.Beatmaps
|
|||||||
cmd.CommandText = "SELECT beatmapset_id, beatmap_id, approved FROM osu_beatmaps WHERE checksum = @MD5Hash OR beatmap_id = @OnlineBeatmapID OR filename = @Path";
|
cmd.CommandText = "SELECT beatmapset_id, beatmap_id, approved FROM osu_beatmaps WHERE checksum = @MD5Hash OR beatmap_id = @OnlineBeatmapID OR filename = @Path";
|
||||||
|
|
||||||
cmd.Parameters.Add(new SqliteParameter("@MD5Hash", beatmap.MD5Hash));
|
cmd.Parameters.Add(new SqliteParameter("@MD5Hash", beatmap.MD5Hash));
|
||||||
cmd.Parameters.Add(new SqliteParameter("@OnlineBeatmapID", beatmap.OnlineBeatmapID));
|
cmd.Parameters.Add(new SqliteParameter("@OnlineBeatmapID", beatmap.OnlineBeatmapID ?? (object)DBNull.Value));
|
||||||
cmd.Parameters.Add(new SqliteParameter("@Path", beatmap.Path));
|
cmd.Parameters.Add(new SqliteParameter("@Path", beatmap.Path));
|
||||||
|
|
||||||
using (var reader = cmd.ExecuteReader())
|
using (var reader = cmd.ExecuteReader())
|
||||||
|
Loading…
Reference in New Issue
Block a user