mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Merge pull request #804 from AWoloszyn/fix-gpu-src-assert
Fix for assert in GetGpuSourceLocationZonesCntReal
This commit is contained in:
commit
026a34a0fc
@ -3425,7 +3425,10 @@ uint64_t* Worker::GetSourceLocationZonesCntReal( uint16_t srcloc )
|
|||||||
uint64_t* Worker::GetGpuSourceLocationZonesCntReal( uint16_t srcloc )
|
uint64_t* Worker::GetGpuSourceLocationZonesCntReal( uint16_t srcloc )
|
||||||
{
|
{
|
||||||
auto it = m_data.gpuSourceLocationZonesCnt.find( srcloc );
|
auto it = m_data.gpuSourceLocationZonesCnt.find( srcloc );
|
||||||
assert( it != m_data.gpuSourceLocationZonesCnt.end() );
|
if( it == m_data.gpuSourceLocationZonesCnt.end() )
|
||||||
|
{
|
||||||
|
it = m_data.gpuSourceLocationZonesCnt.emplace( srcloc, 0 ).first;
|
||||||
|
}
|
||||||
m_data.gpuCntLast.first = srcloc;
|
m_data.gpuCntLast.first = srcloc;
|
||||||
m_data.gpuCntLast.second = &it->second;
|
m_data.gpuCntLast.second = &it->second;
|
||||||
return &it->second;
|
return &it->second;
|
||||||
|
Loading…
Reference in New Issue
Block a user