Fix thread safety issue when accessing files in beatmap (zip) files.

This commit is contained in:
Dean Herbert
2016-11-05 18:16:15 +09:00
parent 2ee5e2efb7
commit 8fe63689a4
3 changed files with 20 additions and 16 deletions

View File

@ -149,12 +149,10 @@ namespace osu.Game.Database
if (beatmapSetInfo == null)
throw new InvalidOperationException($@"Beatmap set {beatmapInfo.BeatmapSetID} is not in the local database.");
var reader = GetReader(beatmapSetInfo);
if (beatmapInfo.Metadata == null)
beatmapInfo.Metadata = beatmapSetInfo.Metadata;
var working = new WorkingBeatmap(beatmapInfo, reader);
var working = new WorkingBeatmap(beatmapInfo, beatmapSetInfo, this);
previous?.TransferTo(working);