From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sun, 14 Apr 2024 07:10:37 +0000 (+1000) Subject: Fix options menu crashing in replays (#26911) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=4cb344cc307c33247492ba64cccca6dfe720540f;p=space-station-14.git Fix options menu crashing in replays (#26911) Not having the nullable set properly is annoying but fixing that would probably be a significant amount of work. --- diff --git a/Content.Client/Options/UI/Tabs/MiscTab.xaml.cs b/Content.Client/Options/UI/Tabs/MiscTab.xaml.cs index 0eff811fa4..13e3fd05f5 100644 --- a/Content.Client/Options/UI/Tabs/MiscTab.xaml.cs +++ b/Content.Client/Options/UI/Tabs/MiscTab.xaml.cs @@ -59,8 +59,10 @@ namespace Content.Client.Options.UI.Tabs UpdateApplyButton(); }; - ShowOocPatronColor.Visible = _playerManager.LocalSession?.Channel.UserData.PatronTier is { } patron; - + // Channel can be null in replays so. + // ReSharper disable once ConditionalAccessQualifierIsNonNullableAccordingToAPIContract + ShowOocPatronColor.Visible = _playerManager.LocalSession?.Channel?.UserData.PatronTier is { }; + HudThemeOption.OnItemSelected += OnHudThemeChanged; DiscordRich.OnToggled += OnCheckBoxToggled; ShowOocPatronColor.OnToggled += OnCheckBoxToggled;