diff options
Diffstat (limited to 'source/Simulator')
-rw-r--r-- | source/Simulator/DelayedFluidSimulator.cpp | 2 | ||||
-rw-r--r-- | source/Simulator/FireSimulator.cpp | 2 | ||||
-rw-r--r-- | source/Simulator/SandSimulator.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/source/Simulator/DelayedFluidSimulator.cpp b/source/Simulator/DelayedFluidSimulator.cpp index b69718977..6cc982e3d 100644 --- a/source/Simulator/DelayedFluidSimulator.cpp +++ b/source/Simulator/DelayedFluidSimulator.cpp @@ -86,7 +86,7 @@ void cDelayedFluidSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, return;
}
- if (a_Chunk == NULL)
+ if ((a_Chunk == NULL) || !a_Chunk->IsValid())
{
return;
}
diff --git a/source/Simulator/FireSimulator.cpp b/source/Simulator/FireSimulator.cpp index 0e6c1fac1..587f45306 100644 --- a/source/Simulator/FireSimulator.cpp +++ b/source/Simulator/FireSimulator.cpp @@ -187,7 +187,7 @@ 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) + if ((a_Chunk == NULL) || !a_Chunk->IsValid()) { return; } diff --git a/source/Simulator/SandSimulator.cpp b/source/Simulator/SandSimulator.cpp index ed1a2bf52..e6026be83 100644 --- a/source/Simulator/SandSimulator.cpp +++ b/source/Simulator/SandSimulator.cpp @@ -93,7 +93,7 @@ bool cSandSimulator::IsAllowedBlock(BLOCKTYPE a_BlockType) void cSandSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) { - if (a_Chunk == NULL) + if ((a_Chunk == NULL) || !a_Chunk->IsValid()) { return; } |