diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 48fb983b..1fad3099 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -789,7 +789,7 @@ void View::ProcessPlotData( const QueuePlotData& ev ) } else { - plot = m_plots[it->second]; + plot = it->second; } const auto time = int64_t( ev.time * m_timerMul ); @@ -1278,17 +1278,16 @@ void View::HandlePlotName( uint64_t name, char* str, size_t sz ) auto it = m_plotRev.find( sl.ptr ); if( it == m_plotRev.end() ) { - const auto idx = m_plots.size(); - m_plotMap.emplace( name, idx ); - m_plotRev.emplace( sl.ptr, idx ); + m_plotMap.emplace( name, pit->second ); + m_plotRev.emplace( sl.ptr, pit->second ); m_plots.push_back( pit->second ); m_strings.emplace( name, sl.ptr ); } else { - m_plotMap.emplace( name, it->second ); + auto plot = it->second; + m_plotMap.emplace( name, plot ); const auto& pp = pit->second->data; - auto plot = m_plots[it->second]; for( auto& v : pp ) { InsertPlot( plot, v ); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 2c79af12..3af138cc 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -192,8 +192,8 @@ private: flat_hash_map> m_pendingCustomStrings; flat_hash_map> m_threadMap; flat_hash_map> m_gpuCtxMap; - flat_hash_map> m_plotMap; - std::unordered_map m_plotRev; + flat_hash_map> m_plotMap; + std::unordered_map m_plotRev; flat_hash_map> m_pendingPlots; flat_hash_map> m_sourceLocationShrink; flat_hash_map> m_pendingSourceLocationPayload;