From 0e2fe666503a1f40cdf6821276d5289b17c96943 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Fri, 18 Dec 2015 11:02:03 +0100 Subject: [PATCH] Check for array size in Mesh::GetBCNamePtr() --- libsrc/meshing/meshclass.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()