fix for 1D meshing (without region names)

This commit is contained in:
Joachim Schoeberl 2025-04-14 10:40:33 +02:00
parent 1db8ea3500
commit 109e7ffcf7

View File

@ -7416,7 +7416,7 @@ namespace netgen
string_view Mesh :: defaultmat_sv = "default"; string_view Mesh :: defaultmat_sv = "default";
const string & Mesh :: GetMaterial (int domnr) const const string & Mesh :: GetMaterial (int domnr) const
{ {
if (domnr <= materials.Size()) if (domnr <= materials.Size() && materials[domnr-1])
return *materials[domnr-1]; return *materials[domnr-1];
static string emptystring("default"); static string emptystring("default");
return emptystring; return emptystring;