mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 22:20:35 +05:00
fix segfault on query non set boundary name in 2D
This commit is contained in:
parent
a1d1df91b7
commit
bdfbf14a39
@ -5910,6 +5910,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
string Mesh :: cd2_default_name = "default";
|
string Mesh :: cd2_default_name = "default";
|
||||||
|
string Mesh :: default_bc = "default";
|
||||||
const string & Mesh :: GetCD2Name (int cd2nr) const
|
const string & Mesh :: GetCD2Name (int cd2nr) const
|
||||||
{
|
{
|
||||||
static string defaultstring = "default";
|
static string defaultstring = "default";
|
||||||
|
@ -625,8 +625,9 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
size_t GetNCD2Names() const { return cd2names.Size(); }
|
size_t GetNCD2Names() const { return cd2names.Size(); }
|
||||||
|
|
||||||
|
DLL_HEADER static string default_bc;
|
||||||
string * GetBCNamePtr (int bcnr) const
|
string * GetBCNamePtr (int bcnr) const
|
||||||
{ return bcnr < bcnames.Size() ? bcnames[bcnr] : nullptr; }
|
{ return (bcnr < bcnames.Size() && bcnames[bcnr]) ? bcnames[bcnr] : &default_bc; }
|
||||||
|
|
||||||
///
|
///
|
||||||
void ClearFaceDescriptors()
|
void ClearFaceDescriptors()
|
||||||
|
Loading…
Reference in New Issue
Block a user