From 9221a532f9fcc47dff90dbd35187c1ce263c9daa Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 16 May 2019 16:58:35 +0200 Subject: [PATCH] guard against double-finishshape --- 3d-models.cpp | 2 +- polygons.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/3d-models.cpp b/3d-models.cpp index 76a6af02..6db635de 100644 --- a/3d-models.cpp +++ b/3d-models.cpp @@ -1088,8 +1088,8 @@ void make_3d_models() { } last->flags |= POLY_TRIANGLES; add_texture(*last); - finishshape(); if(WDIM == 2) shift_last_straight(geom3::FLOOR); + finishshape(); shJelly = shSlime; shift_shape(shMagicSword, geom3::ABODY); diff --git a/polygons.cpp b/polygons.cpp index cb4b7e3b..e1f5d309 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -1882,6 +1882,7 @@ void finishshape() { if(allminus || allplus) last->flags |= POLY_VCONVEX; allshapes.push_back(last); + last = NULL; /* if(isnan(area)) ; else if(intval(hpc[last->s], hpc[last->e-1]) > 1e-6)