fix: Avoid null reference exception.

This commit is contained in:
real-zony 2023-01-29 22:55:20 +08:00
parent f4b17097fd
commit 2eef72e165
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Zony/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@ -36,7 +36,7 @@ public class DefaultUpdater : IUpdater, ISingletonDependency
}
var importantItem = response.Items?.FirstOrDefault(x => x.ItemType == NewVersionItemType.Important);
if (importantItem != null)
if (importantItem?.Url != null)
{
_logger.LogWarning($"发现了新版本,请点击下面的链接进行更新:{importantItem.Url}");
_logger.LogWarning($"最新版本号:{response.NewVersion},当前版本号: ${currentVersion}");