mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Fix possible nullrefs
This commit is contained in:
@ -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:
|
||||||
|
Reference in New Issue
Block a user