diff --git a/libsrc/stlgeom/stlgeommesh.cpp b/libsrc/stlgeom/stlgeommesh.cpp index 2d3e9084..31b8b0be 100644 --- a/libsrc/stlgeom/stlgeommesh.cpp +++ b/libsrc/stlgeom/stlgeommesh.cpp @@ -1340,8 +1340,11 @@ int STLMeshingDummy (STLGeometry* stlgeometry, shared_ptr & mesh, MeshingP if (perfstepsstart <= MESHCONST_MESHEDGES) { + if (mesh) + mesh -> DeleteMesh(); + else + mesh = make_shared(); - mesh = make_shared(); mesh->geomtype = Mesh::GEOM_STL; mesh -> SetGlobalH (mparam.maxh);