1
0

Redstone: check validity of GetBlock

This commit is contained in:
Tiger Wang 2020-07-24 09:11:40 +01:00
parent 1432afefdb
commit bc01cd5e75

View File

@ -171,9 +171,13 @@ void cIncrementalRedstoneSimulator::Simulate(float a_dt)
{ {
continue; continue;
} }
BLOCKTYPE PotentialBlock; BLOCKTYPE PotentialBlock;
NIBBLETYPE PotentialMeta; NIBBLETYPE PotentialMeta;
m_World.GetBlockTypeMeta(Location.x, Location.y, Location.z, PotentialBlock, PotentialMeta); if (!m_World.GetBlockTypeMeta(Location.x, Location.y, Location.z, PotentialBlock, PotentialMeta))
{
continue;
}
auto PotentialSourceHandler = GetComponentHandler(PotentialBlock); auto PotentialSourceHandler = GetComponentHandler(PotentialBlock);
if (PotentialSourceHandler == nullptr) if (PotentialSourceHandler == nullptr)