From a02cfe206203ce71de86a5d97c4b37033cb68ff3 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 13 Apr 2023 16:25:03 +0200 Subject: [PATCH] fixed a possible crash in aperiodic hat --- floorshapes.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/floorshapes.cpp b/floorshapes.cpp index 3e72829f..ee448299 100644 --- a/floorshapes.cpp +++ b/floorshapes.cpp @@ -504,9 +504,14 @@ void geometry_information::generate_floorshapes_for(int id, cell *c, int siid, i } if(area < 0) dist = -dist; - int id = arb::id_of(c->master); - auto& sh = ac.shapes[id]; - apeirogonal = arb::in() && sh.apeirogonal; + apeirogonal = false; + int id = 0; + arb::shape *sh = nullptr; + if(arb::in()) { + int id = arb::id_of(c->master); + sh = &ac.shapes[id]; + apeirogonal = sh->apeirogonal; + } for(int j=0; jvertices.back()); continue; } } auto T = gpushxto0(current);