summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
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/Chunk.cpp
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 '')
-rw-r--r--src/Chunk.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 4703e4536..6ab49036d 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -152,7 +152,9 @@ cChunk::~cChunk()
m_NeighborZP->m_NeighborZM = NULL;
}
delete m_WaterSimulatorData;
+ m_WaterSimulatorData = NULL;
delete m_LavaSimulatorData;
+ m_LavaSimulatorData = NULL;
}
@@ -596,6 +598,7 @@ void cChunk::Tick(float a_Dt)
cEntity * ToDelete = *itr;
itr = m_Entities.erase(itr);
delete ToDelete;
+ ToDelete = NULL;
continue;
}
++itr;
@@ -1417,6 +1420,7 @@ void cChunk::SetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType,
BlockEntity->Destroy();
RemoveBlockEntity(BlockEntity);
delete BlockEntity;
+ BlockEntity = NULL;
}
// If the new block is a block entity, create the entity object: