diff --git a/FluentWeather.Uwp/Controls/Dialogs/SetLocationDialog.xaml.cs b/FluentWeather.Uwp/Controls/Dialogs/SetLocationDialog.xaml.cs index 409bbe9..3dac8b4 100644 --- a/FluentWeather.Uwp/Controls/Dialogs/SetLocationDialog.xaml.cs +++ b/FluentWeather.Uwp/Controls/Dialogs/SetLocationDialog.xaml.cs @@ -33,7 +33,7 @@ public sealed partial class SetLocationDialog : ContentDialog public SetLocationDialog() { this.InitializeComponent(); - if(Common.Settings.DefaultGeolocation.Name is not null) + if(Common.Settings.DefaultGeolocation?.Name is not null) { SecondaryButtonText = "取消"; }