Make the IsNull checks in the hybrid extensions return true if thingDefName really is null. Also add another null check when searching for a hybrid.

This commit is contained in:
lutepickle 2022-06-19 17:09:04 -07:00
parent 204fe0ecc7
commit 6283baa778
2 changed files with 3 additions and 3 deletions

Binary file not shown.

View file

@ -102,7 +102,7 @@ namespace RJW_Menstruation
{
get
{
return thingDefName?.Length < 1;
return (thingDefName?.Length ?? 0) < 1;
}
}
public ThingDef GetDef
@ -131,7 +131,7 @@ namespace RJW_Menstruation
if (hybridExtension.NullOrEmpty()) return null;
else
{
return hybridExtension.Find(x => x.GetDef.defName?.Equals(race) ?? false);
return hybridExtension.Find(x => x.GetDef?.defName?.Equals(race) ?? false);
}
}
@ -165,7 +165,7 @@ namespace RJW_Menstruation
{
get
{
return thingDefName?.Length < 1;
return (thingDefName?.Length ?? 0) < 1;
}
}
public ThingDef GetDef