set can not be null in BeatmapSetCover.cs

This commit is contained in:
Miterosan 2017-11-07 23:13:56 +01:00
parent dd3874daa8
commit d7dee57886
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>. // 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;
@ -12,6 +13,9 @@ public class BeatmapSetCover : Sprite
private readonly BeatmapSetInfo set; private readonly BeatmapSetInfo set;
public BeatmapSetCover(BeatmapSetInfo set) public BeatmapSetCover(BeatmapSetInfo set)
{ {
if (set == null)
throw new ArgumentNullException(nameof(set));
this.set = set; this.set = set;
} }