beatmap can not be null in DifficultyIcon.cs

This commit is contained in:
Miterosan 2017-11-07 23:13:09 +01:00
parent a8acea9cdb
commit 289a1346fc
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;
using osu.Game.Graphics;
@ -15,6 +16,9 @@ public class DifficultyIcon : DifficultyColouredContainer
public DifficultyIcon(BeatmapInfo beatmap) : base(beatmap)
{
if (beatmap == null)
throw new ArgumentNullException(nameof(beatmap));
this.beatmap = beatmap;
Size = new Vector2(20);
}