summaryrefslogtreecommitdiffstats
path: root/source/Simulator/FireSimulator.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Simulator/FireSimulator.cpp5
1 files changed, 5 insertions, 0 deletions
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);