From 798f096ba95bc2479287d716b23a11a15ae4d4dd Mon Sep 17 00:00:00 2001 From: LazuliKao Date: Tue, 4 Apr 2023 20:53:26 +0800 Subject: [PATCH] fix warn --- src/LipUI/Global.cs | 2 +- src/LipUI/ViewModels/InstallPageViewModel.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LipUI/Global.cs b/src/LipUI/Global.cs index b2f20b2..3cccf4e 100644 --- a/src/LipUI/Global.cs +++ b/src/LipUI/Global.cs @@ -379,7 +379,7 @@ void Save() { Directory.CreateDirectory(dir); } - File.WriteAllText(fp, result.ToString()); + File.WriteAllText(fp, result?.ToString()); } catch { diff --git a/src/LipUI/ViewModels/InstallPageViewModel.cs b/src/LipUI/ViewModels/InstallPageViewModel.cs index a0d6471..ead3f38 100644 --- a/src/LipUI/ViewModels/InstallPageViewModel.cs +++ b/src/LipUI/ViewModels/InstallPageViewModel.cs @@ -193,7 +193,7 @@ public async Task FetchInfo() }); if (success) { - if (ToothInfoPanel.Tooth != ToothName) + if (ToothInfoPanel?.Tooth != ToothName) { ToothInfoPanel = new ToothInfoPanelViewModel(package!) {