From dade5551b50da960df16d21b1f926853a6450955 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Thu, 11 Dec 2014 15:27:45 +0000 Subject: [PATCH] stlmeshing - set shared ptr --- libsrc/stlgeom/stlgeommesh.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);