Fix many warnings

This commit is contained in:
Dean Herbert
2018-03-24 18:22:55 +09:00
parent 9d9b9d50bc
commit 0e669c9a3f
16 changed files with 14 additions and 17 deletions

View File

@ -547,6 +547,7 @@ namespace osu.Game.Screens.Select
float? setY = null;
if (!d.IsLoaded || beatmap.Alpha == 0) // can't use IsPresent due to DrawableCarouselItem override.
// ReSharper disable once PossibleNullReferenceException (resharper broken?)
setY = lastSet.Y + lastSet.DrawHeight + 5;
if (d.IsLoaded)

View File

@ -254,7 +254,7 @@ namespace osu.Game.Screens.Select
private OsuSpriteText[] getMapper(BeatmapMetadata metadata)
{
if (string.IsNullOrEmpty(metadata.Author?.Username))
if (metadata.Author == null || string.IsNullOrEmpty(metadata.Author.Username))
return Array.Empty<OsuSpriteText>();
return new[]

View File

@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using OpenTK.Input;
using osu.Framework.Allocation;
using osu.Framework.Audio;
@ -75,7 +76,8 @@ namespace osu.Game.Screens.Select
{
// if we have no beatmaps but osu-stable is found, let's prompt the user to import.
if (!beatmaps.GetAllUsableBeatmapSets().Any() && beatmaps.StableInstallationAvailable)
dialogOverlay.Push(new ImportFromStablePopup(() => beatmaps.ImportFromStable()));
dialogOverlay.Push(new ImportFromStablePopup(() =>
Task.Factory.StartNew(beatmaps.ImportFromStable, TaskCreationOptions.LongRunning)));
});
}
}