diff --git a/osu.Game/Screens/OnlinePlay/Components/OnlinePlayBackgroundScreen.cs b/osu.Game/Screens/OnlinePlay/Components/OnlinePlayBackgroundScreen.cs index 4b34987c30..4f9d1b9246 100644 --- a/osu.Game/Screens/OnlinePlay/Components/OnlinePlayBackgroundScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Components/OnlinePlayBackgroundScreen.cs @@ -1,12 +1,14 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System; using System.Threading; using osu.Framework.Allocation; using osu.Framework.Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Textures; +using osu.Framework.Logging; using osu.Framework.Screens; using osu.Game.Beatmaps; using osu.Game.Database; @@ -108,9 +110,13 @@ namespace osu.Game.Screens.OnlinePlay.Components if (coverImage != null) Sprite.Texture = textures.Get(coverImage); } - catch + catch (OperationCanceledException) { } + catch (Exception ex) + { + Logger.Error(ex, $"Failed to retrieve cover image for beatmap {beatmapId}."); + } } } @@ -124,9 +130,6 @@ namespace osu.Game.Screens.OnlinePlay.Components { Sprite.Texture = beatmapManager.DefaultBeatmap.GetBackground(); } - - public override bool Equals(Background? other) - => other is DefaultBackground; } } }