Merge pull request #1309 from mc-server/coverity_fixes
Fixed potential crash in Player.cpp
This commit is contained in:
commit
babc8b2d18
@ -906,6 +906,10 @@ void cPlayer::KilledBy(TakeDamageInfo & a_TDI)
|
||||
}
|
||||
GetWorld()->BroadcastChatDeath(Printf("%s %s", GetName().c_str(), DamageText.c_str()));
|
||||
}
|
||||
else if (a_TDI.Attacker == NULL) // && !m_World->ShouldBroadcastDeathMessages() by fallthrough
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
else if (a_TDI.Attacker->IsPlayer())
|
||||
{
|
||||
cPlayer * Killer = (cPlayer *)a_TDI.Attacker;
|
||||
|
Loading…
Reference in New Issue
Block a user