1
0
mirror of https://github.com/wolfpld/tracy synced 2025-05-02 13:43:52 +00:00

Add missing locks.

This commit is contained in:
Bartosz Taudul 2017-10-19 23:10:47 +02:00
parent 476597f5ed
commit cf94b1d2e8

View File

@ -1052,13 +1052,15 @@ void View::HandlePlotName( uint64_t name, std::string&& str )
if( it == m_plotRev.end() )
{
const auto idx = m_plots.size();
m_plots.push_back( pit->second );
m_plotMap.emplace( name, idx );
m_plotRev.emplace( str, idx );
std::lock_guard<std::mutex> lock( m_lock );
m_plots.push_back( pit->second );
m_strings.emplace( name, std::move( str ) );
}
else
{
std::lock_guard<std::mutex> lock( m_lock );
m_plotMap.emplace( name, it->second );
const auto& pp = pit->second->data;
auto plot = m_plots[it->second];