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

(ProfileManager) THREAD_STORAGE is not creating in endBlock

This commit is contained in:
Victor Zarubkin 2016-11-20 14:37:42 +03:00
parent 21a7898572
commit d550b91e56

View File

@ -562,10 +562,7 @@ 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())
if (THREAD_STORAGE == nullptr || THREAD_STORAGE->blocks.openedList.empty())
return;
Block& lastBlock = THREAD_STORAGE->blocks.openedList.top();