mirror of
https://github.com/tnodir/fort
synced 2024-11-14 22:25:40 +00:00
UI: MemPlumber::getCaller: Check for isStarted()
This commit is contained in:
parent
994bc43ee6
commit
4c6ea29491
7
src/3rdparty/memplumber/memplumber.cpp
vendored
7
src/3rdparty/memplumber/memplumber.cpp
vendored
@ -98,12 +98,14 @@ class MemPlumberInternal {
|
||||
}
|
||||
}
|
||||
|
||||
bool isVerbose() {
|
||||
bool isVerbose() const {
|
||||
return m_Verbose && m_Dumper != NULL;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
bool isStarted() const { return m_Started; }
|
||||
|
||||
static MemPlumberInternal& getInstance() {
|
||||
static MemPlumberInternal instance;
|
||||
return instance;
|
||||
@ -360,6 +362,9 @@ class MemPlumberInternal {
|
||||
// We can use dbghelp but it's not supported on MinGW. Need to figure out a way to solve it on all platforms
|
||||
const char* getCaller() {
|
||||
|
||||
if (!MemPlumberInternal::getInstance().isStarted())
|
||||
return "";
|
||||
|
||||
#ifdef USE_CPPTRACE
|
||||
const auto objTrace = cpptrace::generate_object_trace(/*skip=*/3, /*max_depth=*/1);
|
||||
const auto trace = objTrace.resolve();
|
||||
|
Loading…
Reference in New Issue
Block a user