Skip to content

Commit

Permalink
Add a null check
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston authored Sep 16, 2023
1 parent bffd73c commit 6a23281
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/util/demangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ namespace util {
*/
std::string demangle(const char* symbol) {

if (symbol == nullptr) { return ""; }

int status = -1;
const std::unique_ptr<char, void (*)(char*)> res{abi::__cxa_demangle(symbol, nullptr, nullptr, &status),
[](char* ptr) {
Expand Down

0 comments on commit 6a23281

Please sign in to comment.