mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 08:41:02 +08:00
init thread storage on end block
This commit is contained in:
parent
19966b40c6
commit
8054c3ab6f
@ -472,6 +472,9 @@ void ProfileManager::endBlock()
|
||||
if (!m_isEnabled.load(std::memory_order_acquire))
|
||||
return;
|
||||
|
||||
if (THREAD_STORAGE == nullptr)
|
||||
THREAD_STORAGE = &threadStorage(getCurrentThreadId());
|
||||
|
||||
if (THREAD_STORAGE->blocks.openedList.empty())
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user