1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:42:55 +08:00

Disallow transferring track from test WorkingBeatmaps which have local stores

This commit is contained in:
Salman Ahmed 2022-05-20 14:43:50 +03:00
parent c78d90ccbd
commit cef99fd020
2 changed files with 14 additions and 0 deletions

View File

@ -59,6 +59,13 @@ namespace osu.Game.Tests
protected override Track GetBeatmapTrack() => trackStore.Get(firstAudioFile);
public override bool TryTransferTrack(WorkingBeatmap target)
{
// Our track comes from a local track store that's disposed on finalizer,
// therefore it's unsafe to transfer it to another working beatmap.
return false;
}
private string firstAudioFile
{
get

View File

@ -373,6 +373,13 @@ namespace osu.Game.Tests.Visual
protected override Track GetBeatmapTrack() => track;
public override bool TryTransferTrack(WorkingBeatmap target)
{
// Our track comes from a local track store that's disposed on finalizer,
// therefore it's unsafe to transfer it to another working beatmap.
return false;
}
public class TrackVirtualStore : AudioCollectionManager<Track>, ITrackStore
{
private readonly IFrameBasedClock referenceClock;