From 98a15bcc9de302710d4b7303c8a3cdaa2174c05a Mon Sep 17 00:00:00 2001 From: marioalexis Date: Wed, 13 Nov 2024 09:08:40 -0300 Subject: [PATCH] Fem: Avoid legacy Netgen meshing if there is no referenced shape - fixes #17814 --- src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp b/src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp index a296b0b10b..5fa6536ea6 100644 --- a/src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp +++ b/src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp @@ -86,7 +86,11 @@ App::DocumentObjectExecReturn* FemMeshShapeNetgenObject::execute() Fem::FemMesh newMesh; - Part::Feature* feat = Shape.getValue(); + const Part::Feature* feat = Shape.getValue(); + if (!feat) { + return App::DocumentObject::StdReturn; + } + TopoDS_Shape shape = feat->Shape.getValue(); NETGENPlugin_Mesher myNetGenMesher(newMesh.getSMesh(), shape, true);