summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-21 23:14:23 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-21 23:14:23 +0200
commit7615ed90c020b88db52b0b094f00cd028e326b5a (patch)
treeca7f647e77195a6346a2333f3d9fe5292cd2ed40 /src/Mobs
parentFixed invalid iterators (diff)
parentMerge branch 'master' of https://github.com/mc-server/MCServer (diff)
downloadcuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar
cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.gz
cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.bz2
cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.lz
cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.xz
cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.tar.zst
cuberite-7615ed90c020b88db52b0b094f00cd028e326b5a.zip
Diffstat (limited to 'src/Mobs')
-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);