1
0

Fixed another redstone simulator crash

This commit is contained in:
Tiger Wang 2014-07-16 22:21:00 +01:00
parent e444106d09
commit 9194438fb5

View File

@ -2101,6 +2101,13 @@ bool cIncrementalRedstoneSimulator::QueueRepeaterPowerChange(int a_RelBlockX, in
void cIncrementalRedstoneSimulator::SetSourceUnpowered(int a_SourceX, int a_SourceY, int a_SourceZ, cChunk * a_Chunk, bool a_IsFirstCall)
{
if (!a_IsFirstCall) // The neighbouring chunks passed when this parameter is false may be invalid
{
if ((a_Chunk == NULL) || !a_Chunk->IsValid())
{
return;
}
}
// TODO: on C++11 support, change both of these to llama functions pased to a std::remove_if
for (PoweredBlocksList::iterator itr = a_Chunk->GetRedstoneSimulatorPoweredBlocksList()->begin(); itr != a_Chunk->GetRedstoneSimulatorPoweredBlocksList()->end();)