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