Fixed segmentation fault on villager damage
It occurred when attack was environmental.
This commit is contained in:
parent
f78a62a5e3
commit
70113b5730
@ -21,7 +21,7 @@ cVillager::cVillager(eVillagerType VillagerType) :
|
||||
void cVillager::DoTakeDamage(TakeDamageInfo & a_TDI)
|
||||
{
|
||||
super::DoTakeDamage(a_TDI);
|
||||
if (a_TDI.Attacker->IsPlayer())
|
||||
if ((a_TDI.Attacker != NULL) && a_TDI.Attacker->IsPlayer())
|
||||
{
|
||||
if (m_World->GetTickRandomNumber(5) == 3)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user