Fixed a segfault (thanks, Martin\!)

This commit is contained in:
Matthias Koefferlein 2025-05-22 18:50:25 +02:00
parent 9b03a1ba64
commit 6b8c79c488
1 changed files with 3 additions and 2 deletions

View File

@ -459,10 +459,11 @@ Polygon::init ()
auto i = v2e.find (v);
tl_assert (i != v2e.end () && i->first == v && i->second != mp_e.back ());
v2e.erase (i);
mp_e.push_back (i->second);
v = i->second->other (v);
v2e.erase (i);
i = v2e.find (v);
while (i != v2e.end () && i->first == v) {
if (i->second == mp_e.back ()) {