Skip to content

Commit

Permalink
avoid strange crush in IsFriendly()
Browse files Browse the repository at this point in the history
  • Loading branch information
rsa committed Apr 27, 2011
1 parent 06b6543 commit e8da198
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/game/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5802,6 +5802,9 @@ bool Unit::IsHostileTo(Unit const* unit) const

bool Unit::IsFriendlyTo(Unit const* unit) const
{
if (!unit)
return true;

// always friendly to self
if(unit==this)
return true;
Expand Down

0 comments on commit e8da198

Please sign in to comment.