diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index 554609d5..20c39384 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -5910,6 +5910,7 @@ namespace netgen } string Mesh :: cd2_default_name = "default"; + string Mesh :: default_bc = "default"; const string & Mesh :: GetCD2Name (int cd2nr) const { static string defaultstring = "default"; diff --git a/libsrc/meshing/meshclass.hpp b/libsrc/meshing/meshclass.hpp index 189684d3..4cb18140 100644 --- a/libsrc/meshing/meshclass.hpp +++ b/libsrc/meshing/meshclass.hpp @@ -625,8 +625,9 @@ namespace netgen } size_t GetNCD2Names() const { return cd2names.Size(); } + DLL_HEADER static string default_bc; string * GetBCNamePtr (int bcnr) const - { return bcnr < bcnames.Size() ? bcnames[bcnr] : nullptr; } + { return (bcnr < bcnames.Size() && bcnames[bcnr]) ? bcnames[bcnr] : &default_bc; } /// void ClearFaceDescriptors()