From 4380ef15bf32810090c693e95078a18e29eb7efd Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Fri, 21 Sep 2018 16:31:09 +0900 Subject: [PATCH] Fix potential exception during async load callback --- osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs index 62f24e8e5c..e326cdb0ca 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs @@ -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; - }); + })); }); } }