summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-06-19 10:49:56 +0200
committerarchshift <admin@archshift.com>2014-06-19 10:49:56 +0200
commite8143de01bff31f9e153949d7ab5b0df82629541 (patch)
treed6a37e6433f973765c8ca63e408dbbd420b08d70 /src/Items
parentMerge pull request #1096 from mc-server/redstonerefactor (diff)
downloadcuberite-e8143de01bff31f9e153949d7ab5b0df82629541.tar
cuberite-e8143de01bff31f9e153949d7ab5b0df82629541.tar.gz
cuberite-e8143de01bff31f9e153949d7ab5b0df82629541.tar.bz2
cuberite-e8143de01bff31f9e153949d7ab5b0df82629541.tar.lz
cuberite-e8143de01bff31f9e153949d7ab5b0df82629541.tar.xz
cuberite-e8143de01bff31f9e153949d7ab5b0df82629541.tar.zst
cuberite-e8143de01bff31f9e153949d7ab5b0df82629541.zip
Diffstat (limited to 'src/Items')
-rw-r--r--src/Items/ItemBow.h1
-rw-r--r--src/Items/ItemHandler.cpp1
-rw-r--r--src/Items/ItemItemFrame.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/Items/ItemBow.h b/src/Items/ItemBow.h
index e0ab339d3..821e2ab26 100644
--- a/src/Items/ItemBow.h
+++ b/src/Items/ItemBow.h
@@ -69,6 +69,7 @@ public:
if (!Arrow->Initialize(*a_Player->GetWorld()))
{
delete Arrow;
+ Arrow = NULL;
return;
}
a_Player->GetWorld()->BroadcastSpawnEntity(*Arrow);
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index d97f986ba..f639423ae 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -260,6 +260,7 @@ void cItemHandler::Deinit()
for(int i = 0; i < 2267; i++)
{
delete m_ItemHandler[i];
+ m_ItemHandler[i] = NULL;
}
memset(m_ItemHandler, 0, sizeof(m_ItemHandler)); // Don't leave any dangling pointers around, just in case
m_HandlerInitialized = false;
diff --git a/src/Items/ItemItemFrame.h b/src/Items/ItemItemFrame.h
index 097f04d0b..b258b4aea 100644
--- a/src/Items/ItemItemFrame.h
+++ b/src/Items/ItemItemFrame.h
@@ -37,6 +37,7 @@ public:
if (!ItemFrame->Initialize(*a_World))
{
delete ItemFrame;
+ ItemFrame = NULL;
return false;
}