Permit nulls to allow test cases to run successfully

This commit is contained in:
Dean Herbert 2017-08-24 21:26:50 +09:00
parent 0082640548
commit febf0348be

View File

@ -49,7 +49,7 @@ namespace osu.Game.Overlays.Direct
SetInfo = setInfo;
}
[BackgroundDependencyLoader]
[BackgroundDependencyLoader(permitNulls: true)]
private void load(APIAccess api, BeatmapManager beatmaps, OsuColour colours, NotificationOverlay notifications)
{
this.api = api;
@ -110,6 +110,8 @@ namespace osu.Game.Overlays.Direct
protected void StartDownload()
{
if (api == null) return;
if (!api.LocalUser.Value.IsSupporter)
{
notifications.Post(new SimpleNotification