From 039d1c77dbbe98dd68f81b67ff1a9593ca62f31c Mon Sep 17 00:00:00 2001 From: SL <123@123.com> Date: Fri, 5 Jun 2026 09:59:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3MainView=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E6=97=B6=E6=9F=90=E4=BA=9B=E5=85=83=E7=B4=A0?= =?UTF-8?q?=E6=89=BE=E4=B8=8D=E5=88=B0=E5=AF=BC=E8=87=B4=E5=BC=95=E5=8F=91?= =?UTF-8?q?NullReference=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/SicUI/MainViewModel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/App/SicUI/MainViewModel.cs b/App/SicUI/MainViewModel.cs index 46c1402..2e318b5 100644 --- a/App/SicUI/MainViewModel.cs +++ b/App/SicUI/MainViewModel.cs @@ -1075,6 +1075,7 @@ namespace SicUI.Client { var scPath = $"PM.{_currentMenuItem.System}.BackgroundColor"; var scConfig = QueryDataClient.Instance.Service.GetConfig(scPath); + if (scConfig == null) return; var hexColor = scConfig.ToString(); try { @@ -1094,7 +1095,6 @@ namespace SicUI.Client UpdatePMPageBackground(Colors.Transparent); UpdateMainMenuBackground(); } - } else { @@ -1374,12 +1374,12 @@ namespace SicUI.Client if (menuInfo.System is "PM1" or "PM2") { var rect = FindVisualChildByName(container, "InnerBG"); - rect.Fill = menuInfo.Selected + rect?.Fill = menuInfo.Selected ? BgActiveContent : new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF346294")); var bgBorder = FindVisualChildByName(container, "BG"); - bgBorder.Background = menuInfo.Selected + bgBorder?.Background = menuInfo.Selected ? BgActiveContent : new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF346294"));