summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mobs/Monster.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index aa6071515..171097aba 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -526,7 +526,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;
}