From d77ec67b9fe0619a5c273b4f73c4dbab84aaa114 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Wed, 24 Jan 2018 10:53:34 +0100 Subject: [PATCH] OCCGenerateMesh: Initialize mesh if nullptr is given --- libsrc/occ/occgenmesh.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsrc/occ/occgenmesh.cpp b/libsrc/occ/occgenmesh.cpp index 5bea6c6c..7ce79d8c 100644 --- a/libsrc/occ/occgenmesh.cpp +++ b/libsrc/occ/occgenmesh.cpp @@ -1295,8 +1295,8 @@ namespace netgen if (mparam.perfstepsstart <= MESHCONST_ANALYSE) { - // delete mesh; - // mesh = make_shared(); + if(mesh.get() == nullptr) + mesh = make_shared(); mesh->geomtype = Mesh::GEOM_OCC; OCCSetLocalMeshSize(geom,*mesh);