mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:13:21 +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
|
public class BackgroundScreenBeatmap : BlurrableBackgroundScreen
|
||||||
{
|
{
|
||||||
private WorkingBeatmap beatmap;
|
private WorkingBeatmap beatmap;
|
||||||
|
|
||||||
public WorkingBeatmap Beatmap
|
public WorkingBeatmap Beatmap
|
||||||
{
|
{
|
||||||
get { return beatmap; }
|
get { return beatmap; }
|
||||||
@ -24,7 +25,7 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
|
|
||||||
Schedule(() =>
|
Schedule(() =>
|
||||||
{
|
{
|
||||||
LoadComponentAsync(new BeatmapBackground(beatmap), b =>
|
LoadComponentAsync(new BeatmapBackground(beatmap), b => Schedule(() =>
|
||||||
{
|
{
|
||||||
float newDepth = 0;
|
float newDepth = 0;
|
||||||
if (Background != null)
|
if (Background != null)
|
||||||
@ -38,7 +39,7 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
b.Depth = newDepth;
|
b.Depth = newDepth;
|
||||||
Add(Background = b);
|
Add(Background = b);
|
||||||
Background.BlurSigma = BlurTarget;
|
Background.BlurSigma = BlurTarget;
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user