summaryrefslogtreecommitdiffstats
path: root/source/Simulator
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-03 15:25:27 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-03 15:25:27 +0100
commit5d219dab283e6769319440d37750803b5f991268 (patch)
tree9c37176d7eca50515733406c41833eba24ca66a1 /source/Simulator
parentAdded missing item types, fixed placing stone walls. (diff)
downloadcuberite-5d219dab283e6769319440d37750803b5f991268.tar
cuberite-5d219dab283e6769319440d37750803b5f991268.tar.gz
cuberite-5d219dab283e6769319440d37750803b5f991268.tar.bz2
cuberite-5d219dab283e6769319440d37750803b5f991268.tar.lz
cuberite-5d219dab283e6769319440d37750803b5f991268.tar.xz
cuberite-5d219dab283e6769319440d37750803b5f991268.tar.zst
cuberite-5d219dab283e6769319440d37750803b5f991268.zip
Diffstat (limited to 'source/Simulator')
-rw-r--r--source/Simulator/DelayedFluidSimulator.cpp5
-rw-r--r--source/Simulator/FireSimulator.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/source/Simulator/DelayedFluidSimulator.cpp b/source/Simulator/DelayedFluidSimulator.cpp
index 871ba4801..be0cc1bbc 100644
--- a/source/Simulator/DelayedFluidSimulator.cpp
+++ b/source/Simulator/DelayedFluidSimulator.cpp
@@ -60,6 +60,11 @@ void cDelayedFluidSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ,
return;
}
+ if (a_Chunk == NULL)
+ {
+ return;
+ }
+
int RelX = a_BlockX - a_Chunk->GetPosX() * cChunkDef::Width;
int RelZ = a_BlockZ - a_Chunk->GetPosZ() * cChunkDef::Width;
BLOCKTYPE BlockType = a_Chunk->GetBlock(RelX, a_BlockY, RelZ);
diff --git a/source/Simulator/FireSimulator.cpp b/source/Simulator/FireSimulator.cpp
index c9ade90c9..0e6c1fac1 100644
--- a/source/Simulator/FireSimulator.cpp
+++ b/source/Simulator/FireSimulator.cpp
@@ -187,6 +187,11 @@ bool cFireSimulator::IsForever(BLOCKTYPE a_BlockType)
void cFireSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk)
{
+ if (a_Chunk == NULL)
+ {
+ return;
+ }
+
int RelX = a_BlockX - a_Chunk->GetPosX() * cChunkDef::Width;
int RelZ = a_BlockZ - a_Chunk->GetPosZ() * cChunkDef::Width;
BLOCKTYPE BlockType = a_Chunk->GetBlock(RelX, a_BlockY, RelZ);