Keep lock until we're done with the data.

This commit is contained in:
Bartosz Taudul 2021-10-21 01:31:03 +02:00
parent 4348c5428d
commit 93b6fd72c3
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -346,9 +346,6 @@ CallstackSymbolData DecodeSymbolAddress( uint64_t ptr )
DBGHELP_LOCK;
#endif
const auto res = SymGetLineFromAddr64( GetCurrentProcess(), ptr, &displacement, &line );
#ifdef TRACY_DBGHELP_LOCK
DBGHELP_UNLOCK;
#endif
if( res == 0 )
{
sym.file = "[unknown]";
@ -361,6 +358,9 @@ CallstackSymbolData DecodeSymbolAddress( uint64_t ptr )
sym.line = line.LineNumber;
sym.needFree = true;
}
#ifdef TRACY_DBGHELP_LOCK
DBGHELP_UNLOCK;
#endif
return sym;
}