From 2d02ff1df8204a74c477a27b3d30f297fde2e5bf Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Thu, 10 Apr 2014 15:50:43 +0100 Subject: [PATCH] Update Monster.cpp --- src/Mobs/Monster.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index aa6071515..22ee6e0dd 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -1,4 +1,3 @@ - #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "IncludeAllMonsters.h" @@ -526,7 +525,10 @@ void cMonster::KilledBy(cEntity * a_Killer) break; } } - m_World->SpawnExperienceOrb(GetPosX(), GetPosY(), GetPosZ(), Reward); + if (a_Killer != NULL) + { + m_World->SpawnExperienceOrb(GetPosX(), GetPosY(), GetPosZ(), Reward); + } m_DestroyTimer = 0; }