Only collect backtrace if NG_BACKTRACE is set

This commit is contained in:
Matthias Hochsteger 2019-11-20 14:30:23 +01:00
parent eb6f0efc2f
commit 8940bf7c2c

View File

@ -144,6 +144,8 @@ namespace ngcore
std::string GetBackTrace() std::string GetBackTrace()
{ {
if(!getenv("NG_BACKTRACE"))
return "";
std::cerr << "Collecting backtrace..." << std::endl; std::cerr << "Collecting backtrace..." << std::endl;
std::stringstream result; std::stringstream result;
void *bt[100]; void *bt[100];