From fc2900eac635a4a0d635d13b8c3c8667f02921ce Mon Sep 17 00:00:00 2001 From: Albie Spriddell Date: Wed, 13 Nov 2024 19:21:00 +0000 Subject: [PATCH] add nullcheck to country code --- .../ViewModels/ConnectionSettingsTabViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DragonFruit.OnionFruit/ViewModels/ConnectionSettingsTabViewModel.cs b/DragonFruit.OnionFruit/ViewModels/ConnectionSettingsTabViewModel.cs index 19b5e4a..aadc1ec 100644 --- a/DragonFruit.OnionFruit/ViewModels/ConnectionSettingsTabViewModel.cs +++ b/DragonFruit.OnionFruit/ViewModels/ConnectionSettingsTabViewModel.cs @@ -252,7 +252,7 @@ public TorNodeCountry SelectedExitCountry private static string GetFlagEmoji(TorNodeCountry country) { // use globe if not known - if (country.CountryCode == IOnionDatabase.TorCountryCode) + if (country?.CountryCode is null or IOnionDatabase.TorCountryCode) { return "\U0001F6A9"; }