mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:03:08 +08:00
Ensure WorkingBeatmap
is always using a detached instance
This commit is contained in:
parent
2ae48d5a87
commit
823b3c1c0f
@ -422,7 +422,7 @@ namespace osu.Game.Beatmaps
|
|||||||
{
|
{
|
||||||
// Detached sets don't come with files.
|
// Detached sets don't come with files.
|
||||||
// If we seem to be missing files, now is a good time to re-fetch.
|
// If we seem to be missing files, now is a good time to re-fetch.
|
||||||
if (beatmapInfo?.BeatmapSet?.Files.Count == 0)
|
if (beatmapInfo?.IsManaged == true || beatmapInfo?.BeatmapSet?.Files.Count == 0)
|
||||||
{
|
{
|
||||||
Realm.Run(r =>
|
Realm.Run(r =>
|
||||||
{
|
{
|
||||||
@ -433,6 +433,8 @@ namespace osu.Game.Beatmaps
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug.Assert(beatmapInfo?.IsManaged != true);
|
||||||
|
|
||||||
return workingBeatmapCache.GetWorkingBeatmap(beatmapInfo);
|
return workingBeatmapCache.GetWorkingBeatmap(beatmapInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user