1
0
Fork 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
1 changed files with 5 additions and 1 deletions

View File

@ -171,9 +171,13 @@ void cIncrementalRedstoneSimulator::Simulate(float a_dt)
{
continue;
}
BLOCKTYPE PotentialBlock;
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);
if (PotentialSourceHandler == nullptr)