altmap:: protect from crashing barriers

This commit is contained in:
Zeno Rogue 2021-07-31 20:30:12 +02:00
parent 8498e0ce14
commit 923420fd0d
1 changed files with 2 additions and 0 deletions

View File

@ -261,6 +261,8 @@ EX heptagon *create_altmap(cell *c, int rad, hstate firststate, int special IS(0
cellwalker bf(c, gdir); bf += rev;
auto p = generate_random_path(bf, rad, false, false);
for(auto c: p.path) if(c->bardir != NODIR) return nullptr;
heptagon *h = p.last.at->master;