diff options
Diffstat (limited to 'exceptions.cpp')
| -rw-r--r-- | exceptions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/exceptions.cpp b/exceptions.cpp index bdc1db2c..55a5e97f 100644 --- a/exceptions.cpp +++ b/exceptions.cpp @@ -26,7 +26,7 @@ BinaryNinja::ExceptionWithStackTrace::ExceptionWithStackTrace(const std::string& { m_originalMessage = message; m_message = message; - if (getenv("BN_DEBUG_EXCEPTION_TRACES")) + if (auto var = getenv("BN_DEBUG_EXCEPTION_TRACES"); !var || var[0] != '0') { char* stackTrace = BNGetCurrentStackTraceString(); if (stackTrace) @@ -88,7 +88,7 @@ BinaryNinja::ExceptionWithStackTrace::ExceptionWithStackTrace(std::exception_ptr m_message = "Some unknown exception"; } } - if (getenv("BN_DEBUG_EXCEPTION_TRACES")) + if (auto var = getenv("BN_DEBUG_EXCEPTION_TRACES"); !var || var[0] != '0') { char* stackTrace = BNGetCurrentStackTraceString(); if (stackTrace) |
