diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index 356192fc..a40deef9 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -5768,6 +5768,7 @@ namespace netgen materials.Elem(domnr) = new string(mat); } + string Mesh :: defaultmat = "default"; const string & Mesh :: GetMaterial (int domnr) const { if (domnr <= materials.Size()) diff --git a/libsrc/meshing/meshclass.hpp b/libsrc/meshing/meshclass.hpp index 40d8ebb4..4cf9c605 100644 --- a/libsrc/meshing/meshclass.hpp +++ b/libsrc/meshing/meshclass.hpp @@ -593,9 +593,9 @@ namespace netgen DLL_HEADER void SetMaterial (int domnr, const string & mat); /// const string & GetMaterial (int domnr) const; + static string defaultmat; const string * GetMaterialPtr (int domnr) const // 1-based { - static string defaultmat = "default"; return domnr <= materials.Size() ? materials.Get(domnr) : &defaultmat; }