From 4cb344cc307c33247492ba64cccca6dfe720540f Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sun, 14 Apr 2024 17:10:37 +1000 Subject: [PATCH] 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. --- Content.Client/Options/UI/Tabs/MiscTab.xaml.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.51.2