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

Reference whether texture is available rather than disposed

This commit is contained in:
smoogipoo 2018-09-11 11:28:02 +09:00
parent 5e5a74293e
commit 9b0954ab81

View File

@ -135,7 +135,7 @@ namespace osu.Game.Beatmaps
public bool BackgroundLoaded => background.IsResultAvailable;
public Texture Background => background.Value;
protected virtual bool BackgroundStillValid(Texture b) => b == null || !b.IsDisposed;
protected virtual bool BackgroundStillValid(Texture b) => b == null || b.Available;
protected abstract Texture GetBackground();
private readonly RecyclableLazy<Texture> background;