summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mobs/Blaze.cpp1
-rw-r--r--src/Mobs/Ghast.cpp1
-rw-r--r--src/Mobs/Skeleton.cpp1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/Mobs/Blaze.cpp b/src/Mobs/Blaze.cpp
index 19bdf8737..b4104d530 100644
--- a/src/Mobs/Blaze.cpp
+++ b/src/Mobs/Blaze.cpp
@@ -47,6 +47,7 @@ void cBlaze::Attack(float a_Dt)
if (!FireCharge->Initialize(*m_World))
{
delete FireCharge;
+ FireCharge = NULL;
return;
}
m_World->BroadcastSpawnEntity(*FireCharge);
diff --git a/src/Mobs/Ghast.cpp b/src/Mobs/Ghast.cpp
index 4df8e165c..6aac14779 100644
--- a/src/Mobs/Ghast.cpp
+++ b/src/Mobs/Ghast.cpp
@@ -49,6 +49,7 @@ void cGhast::Attack(float a_Dt)
if (!GhastBall->Initialize(*m_World))
{
delete GhastBall;
+ GhastBall = NULL;
return;
}
m_World->BroadcastSpawnEntity(*GhastBall);
diff --git a/src/Mobs/Skeleton.cpp b/src/Mobs/Skeleton.cpp
index e7f3971cc..e3357185d 100644
--- a/src/Mobs/Skeleton.cpp
+++ b/src/Mobs/Skeleton.cpp
@@ -84,6 +84,7 @@ void cSkeleton::Attack(float a_Dt)
if (!Arrow->Initialize(*m_World))
{
delete Arrow;
+ Arrow = NULL;
return;
}
m_World->BroadcastSpawnEntity(*Arrow);