diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-01-26 15:28:51 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-01-26 15:28:51 +0100 |
commit | bed2ee22e8283a2e8bd0790a89124839319c2fc3 (patch) | |
tree | ee9e66a7b7c63995797a502f209079c1422ce9c9 /src/Mobs/Villager.cpp | |
parent | Refactored cBlockHandler::OnUse and dependents (diff) | |
parent | Merge pull request #589 from mc-server/minecartimprovements (diff) | |
download | cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.tar cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.tar.gz cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.tar.bz2 cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.tar.lz cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.tar.xz cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.tar.zst cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.zip |
Diffstat (limited to 'src/Mobs/Villager.cpp')
-rw-r--r-- | src/Mobs/Villager.cpp | 2 |
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) { |