1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:07:38 +08:00

The TextureStore in Country.cs can noit be null.

This commit is contained in:
Miterosan 2017-11-07 22:50:00 +01:00
parent e417eceb98
commit d5b275fa53

View File

@ -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 Newtonsoft.Json; using Newtonsoft.Json;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
@ -45,6 +46,9 @@ namespace osu.Game.Users
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(TextureStore ts) private void load(TextureStore ts)
{ {
if (ts == null)
throw new ArgumentNullException(nameof(ts));
textures = ts; textures = ts;
sprite.Texture = textures.Get($@"Flags/{flagName}"); sprite.Texture = textures.Get($@"Flags/{flagName}");
} }