diff --git a/libsrc/meshing/meshclass.hpp b/libsrc/meshing/meshclass.hpp index 1f18832d..4738c0d7 100644 --- a/libsrc/meshing/meshclass.hpp +++ b/libsrc/meshing/meshclass.hpp @@ -582,7 +582,7 @@ namespace netgen const string & GetBCName ( int bcnr ) const; string * GetBCNamePtr ( int bcnr ) - { return bcnames[bcnr]; } + { return bcnr < bcnames.Size() ? bcnames[bcnr] : nullptr; } /// void ClearFaceDescriptors()