1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 05:32:54 +08:00

Revert nullability enable in BeatmapBackground

Due to varying expectations in handling of `Beatmap`. Some places allow
or expect null and some don't. Needs to be looked at closer separately.
This commit is contained in:
Bartłomiej Dach 2023-06-24 15:40:06 +02:00
parent 66ef199fa4
commit 2c1a44da89
No known key found for this signature in database

View File

@ -1,6 +1,8 @@
// 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Graphics.Textures;
using osu.Game.Beatmaps;
@ -22,7 +24,7 @@ namespace osu.Game.Graphics.Backgrounds
[BackgroundDependencyLoader]
private void load(LargeTextureStore textures)
{
Sprite.Texture = Beatmap.GetBackground() ?? textures.Get(fallbackTextureName);
Sprite.Texture = Beatmap?.GetBackground() ?? textures.Get(fallbackTextureName);
}
public override bool Equals(Background other)