mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 14:10:34 +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
|
try
|
||||||
{
|
{
|
||||||
char *s = abi::__cxa_demangle(typeinfo, nullptr, nullptr, &status);
|
char *s = abi::__cxa_demangle(typeinfo, nullptr, nullptr, &status);
|
||||||
std::string result{s};
|
std::string result;
|
||||||
free(s);
|
if (s == nullptr)
|
||||||
|
result = typeinfo;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = s;
|
||||||
|
free(s);
|
||||||
|
}
|
||||||
result = detail::CleanupDemangledName(result);
|
result = detail::CleanupDemangledName(result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user