On replay don't initialise dbghelp at startup, instead init on demand

This commit is contained in:
baldurk
2019-05-02 11:29:00 +01:00
parent c7bd434024
commit 87c4d529c0
+7 -1
View File
@@ -1076,7 +1076,10 @@ namespace Callstack
{
void Init()
{
::InitDbgHelp();
// if we're capturing, need to initialise immediately to claim ownership and be ready to collect
// callstacks. On replay we can do this later when needed.
if(!RenderDoc::Inst().IsReplayApp())
::InitDbgHelp();
}
Stackwalk *Collect()
@@ -1097,6 +1100,9 @@ StackResolver *MakeResolver(byte *moduleDB, size_t DBSize, RENDERDOC_ProgressCal
return NULL;
}
// initialise dbghelp if we haven't already
::InitDbgHelp();
return new Win32CallstackResolver(moduleDB, DBSize, progress);
}