Update gender check

showdownset now no longer leaks nulls
This commit is contained in:
Kurt 2019-02-13 15:50:48 -08:00
parent 6f76a3b1ae
commit e7486e4534

View file

@ -219,7 +219,7 @@ namespace PKHeX.Core
/// <param name="gender">Desired <see cref="PKM.Gender"/> value to set.</param>
public static void SetGender(this PKM pk, string gender)
{
int g = gender == null
int g = string.IsNullOrEmpty(gender)
? pk.GetSaneGender()
: PKX.GetGenderFromString(gender);
pk.SetGender(g);