mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
check for null-ptr from cxa_demangle
This commit is contained in:
parent
fe3abbdec4
commit
8a79f91cb1
@ -64,8 +64,14 @@ namespace ngcore
|
||||
try
|
||||
{
|
||||
char *s = abi::__cxa_demangle(typeinfo, nullptr, nullptr, &status);
|
||||
std::string result{s};
|
||||
free(s);
|
||||
std::string result;
|
||||
if (s == nullptr)
|
||||
result = typeinfo;
|
||||
else
|
||||
{
|
||||
result = s;
|
||||
free(s);
|
||||
}
|
||||
result = detail::CleanupDemangledName(result);
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user