mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 04:52:57 +08:00
Fix potential exception during async load callback
This commit is contained in:
parent
c1604145df
commit
4380ef15bf
@ -12,6 +12,7 @@ namespace osu.Game.Screens.Backgrounds
|
||||
public class BackgroundScreenBeatmap : BlurrableBackgroundScreen
|
||||
{
|
||||
private WorkingBeatmap beatmap;
|
||||
|
||||
public WorkingBeatmap Beatmap
|
||||
{
|
||||
get { return beatmap; }
|
||||
@ -24,7 +25,7 @@ namespace osu.Game.Screens.Backgrounds
|
||||
|
||||
Schedule(() =>
|
||||
{
|
||||
LoadComponentAsync(new BeatmapBackground(beatmap), b =>
|
||||
LoadComponentAsync(new BeatmapBackground(beatmap), b => Schedule(() =>
|
||||
{
|
||||
float newDepth = 0;
|
||||
if (Background != null)
|
||||
@ -38,7 +39,7 @@ namespace osu.Game.Screens.Backgrounds
|
||||
b.Depth = newDepth;
|
||||
Add(Background = b);
|
||||
Background.BlurSigma = BlurTarget;
|
||||
});
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user