1
0

Merge pull request #1309 from mc-server/coverity_fixes

Fixed potential crash in Player.cpp
This commit is contained in:
Mattes D 2014-08-10 22:30:26 +02:00
commit babc8b2d18

View File

@ -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;