summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;
}