Fixed segmentation fault on villager damage
It occurred when attack was environmental.master
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…
Reference in New Issue