From 03791b1e632e8494ba5e261f430d8a8d91a599b8 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 27 Sep 2014 22:24:49 +0200 Subject: Fixed another redstone crash. --- src/Simulator/IncrementalRedstoneSimulator.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Simulator/IncrementalRedstoneSimulator.inc b/src/Simulator/IncrementalRedstoneSimulator.inc index adaa47967..937e6b790 100644 --- a/src/Simulator/IncrementalRedstoneSimulator.inc +++ b/src/Simulator/IncrementalRedstoneSimulator.inc @@ -408,7 +408,12 @@ void cIncrementalRedstoneSimulator::cIncrementalRedstoneSimulatorChunkData *)a_Chunk->GetRedstoneSimulatorData())->m_PoweredBlocks; + cIncrementalRedstoneSimulator::cIncrementalRedstoneSimulatorChunkData * SimulatorChunkData = ((cIncrementalRedstoneSimulator::cIncrementalRedstoneSimulatorChunkData *)a_Chunk->GetRedstoneSimulatorData()); + if (SimulatorChunkData == NULL) + { + return; + } + PoweredBlocksList & PoweredBlocks = SimulatorChunkData->m_PoweredBlocks; for (typename PoweredBlocksList::iterator itr = PoweredBlocks.begin(); itr != PoweredBlocks.end();) { if (!itr->a_SourcePos.Equals(Vector3i(a_BlockX, a_BlockY, a_BlockZ))) -- cgit v1.2.3