Skip to content

Commit

Permalink
add nullcheck to country code
Browse files Browse the repository at this point in the history
  • Loading branch information
aspriddell committed Nov 13, 2024
1 parent 250a5b9 commit fc2900e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit fc2900e

Please sign in to comment.