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);