summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-26 01:14:00 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-26 01:14:00 +0100
commit70113b57309060b785b070bb2a0075801bc4d844 (patch)
tree4e474e096400cd80a671cd7aae027581dafbba9a
parentMerge pull request #575 from worktycho/GeneratingBenchmark (diff)
downloadcuberite-70113b57309060b785b070bb2a0075801bc4d844.tar
cuberite-70113b57309060b785b070bb2a0075801bc4d844.tar.gz
cuberite-70113b57309060b785b070bb2a0075801bc4d844.tar.bz2
cuberite-70113b57309060b785b070bb2a0075801bc4d844.tar.lz
cuberite-70113b57309060b785b070bb2a0075801bc4d844.tar.xz
cuberite-70113b57309060b785b070bb2a0075801bc4d844.tar.zst
cuberite-70113b57309060b785b070bb2a0075801bc4d844.zip
-rw-r--r--src/Mobs/Villager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp
index 7f89fb6cc..c8ff4f101 100644
--- a/src/Mobs/Villager.cpp
+++ b/src/Mobs/Villager.cpp
@@ -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)
{