mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 10:22:56 +08:00
Textures in UserCoverBackground.cs can not be null
This commit is contained in:
parent
d5b275fa53
commit
2518b5e9a0
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
@ -19,6 +20,9 @@ namespace osu.Game.Users
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures)
|
private void load(TextureStore textures)
|
||||||
{
|
{
|
||||||
|
if (textures == null)
|
||||||
|
throw new ArgumentNullException(nameof(textures));
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(user.CoverUrl))
|
if (!string.IsNullOrEmpty(user.CoverUrl))
|
||||||
Texture = textures.Get(user.CoverUrl);
|
Texture = textures.Get(user.CoverUrl);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user