diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index ac6d6743f..0293c3567 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -2202,6 +2202,8 @@ static void polymer_updatewall(int16_t wallnum) // it also works, bitches wal = &wall[wallnum]; nwallnum = wal->nextwall; + if (sectorofwall(wallnum) == -1) + return; // yay, corrupt map sec = §or[sectorofwall(wallnum)]; if (sec->wallptr > wallnum) return; // the map is horribly corrupt