Don't delete objects allocated in renderdoc module outside it.

This commit is contained in:
baldurk
2017-04-27 18:18:25 +01:00
parent 5fbf49a304
commit dd2f6eb88a
7 changed files with 25 additions and 7 deletions
+4 -1
View File
@@ -484,7 +484,10 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
ShaderViewer::~ShaderViewer()
{
delete m_Trace;
// don't want to async invoke while using 'this', so save the trace separately
ShaderDebugTrace *trace = m_Trace;
m_Ctx.Replay().AsyncInvoke([trace](IReplayController *r) { r->FreeTrace(trace); });
if(m_CloseCallback)
m_CloseCallback(&m_Ctx);