0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-28 01:04:41 +08:00

init thread storage on end block

This commit is contained in:
Victor Zarubkin 2016-10-19 22:21:04 +03:00 committed by Sergey Yagovtsev
parent 19966b40c6
commit 8054c3ab6f

View File

@ -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;