1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:33:20 +08:00

Fix possible nullrefs

This commit is contained in:
smoogipoo 2020-02-14 15:01:30 +09:00
parent 7fdc8cc7c1
commit 3a0b2508d4

View File

@ -45,7 +45,7 @@ namespace osu.Game.Overlays.Direct
[BackgroundDependencyLoader(true)] [BackgroundDependencyLoader(true)]
private void load(OsuGame game, BeatmapManager beatmaps) private void load(OsuGame game, BeatmapManager beatmaps)
{ {
if (BeatmapSet.Value.OnlineInfo.Availability?.DownloadDisabled ?? false) if (BeatmapSet.Value?.OnlineInfo?.Availability?.DownloadDisabled ?? false)
{ {
button.Enabled.Value = false; button.Enabled.Value = false;
button.TooltipText = "this beatmap is currently not available for download."; button.TooltipText = "this beatmap is currently not available for download.";
@ -62,7 +62,7 @@ namespace osu.Game.Overlays.Direct
break; break;
case DownloadState.LocallyAvailable: case DownloadState.LocallyAvailable:
game.PresentBeatmap(BeatmapSet.Value); game?.PresentBeatmap(BeatmapSet.Value);
break; break;
default: default: