palette can not be null in DifficultyColouredContainer.cs

This commit is contained in:
Miterosan 2017-11-07 23:16:19 +01:00
parent 36ce287b88
commit a15ab785f2
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
@ -23,6 +24,9 @@ public DifficultyColouredContainer(BeatmapInfo beatmap)
[BackgroundDependencyLoader]
private void load(OsuColour palette)
{
if (palette == null)
throw new ArgumentNullException(nameof(palette));
this.palette = palette;
AccentColour = getColour(beatmap);
}