From 889402a56a60736b213eda63d2a2a52e341b0c47 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 22 Jul 2013 19:54:27 +0000 Subject: Simulators don't simulate in invalid chunks (valgrind error) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1676 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Simulator/SandSimulator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/Simulator/SandSimulator.cpp') 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; } -- cgit v1.2.3