Add missing null checks to Units.cpp

develop
Chris Dombroski 2015-01-29 13:33:12 -05:00
parent 4199728ba6
commit 1514233aaa
1 changed files with 2 additions and 0 deletions

@ -1047,11 +1047,13 @@ bool Units::isTamable(df::unit* unit)
bool Units::isMale(df::unit* unit)
{
CHECK_NULL_POINTER(unit);
return unit->sex == 1;
}
bool Units::isFemale(df::unit* unit)
{
CHECK_NULL_POINTER(unit);
return unit->sex == 0;
}