Redstone: check validity of GetBlock
This commit is contained in:
parent
1432afefdb
commit
bc01cd5e75
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user