mirror of https://github.com/ppy/osu
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 @@ private bool checkLocalCache(BeatmapSetInfo set, BeatmapInfo beatmap)
|
|||
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("@OnlineBeatmapID", beatmap.OnlineBeatmapID));
|
||||
cmd.Parameters.Add(new SqliteParameter("@OnlineBeatmapID", beatmap.OnlineBeatmapID ?? (object)DBNull.Value));
|
||||
cmd.Parameters.Add(new SqliteParameter("@Path", beatmap.Path));
|
||||
|
||||
using (var reader = cmd.ExecuteReader())
|
||||
|
|
Loading…
Reference in New Issue