diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index acc667156..c4e6fbb83 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2016,7 +2016,7 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny) if (parts[i].type==PT_NEUT) { // target material is NEUTPENETRATE, meaning it gets moved around when neutron passes unsigned s = pmap[y][x]; - if (!(elements[s&0xFF].Properties&PROP_NEUTPENETRATE)) + if (s && !(elements[s&0xFF].Properties&PROP_NEUTPENETRATE)) return 1; // if the element currently underneath neutron isn't NEUTPENETRATE, don't move anything except the neutron // if nothing is currently underneath neutron, only move target particle if (s)