mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 16:52:54 +08:00
Add load check to avoid double-loading
This commit is contained in:
parent
e9ab329e93
commit
5ba8388e54
@ -1,4 +1,4 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
@ -36,6 +36,9 @@ namespace osu.Game.Screens.Backgrounds
|
||||
|
||||
beatmap = value;
|
||||
|
||||
// load will be completed in async load.
|
||||
if (LoadState < LoadState.Ready) return;
|
||||
|
||||
Schedule(() => { LoadComponentAsync(new BeatmapBackground(beatmap), b => Schedule(() => backgroundLoaded(b))); });
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user