mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Fix potential race when destroying windows while command is in flight
This commit is contained in:
@@ -2752,5 +2752,11 @@ data.
|
||||
rdcstr ConfigFilePath(const rdcstr &filename);
|
||||
|
||||
// simple helper for the common case of 'we just need to run this on the replay thread'
|
||||
#define INVOKE_MEMFN(function) \
|
||||
m_Ctx.Replay().AsyncInvoke([this](IReplayController *r) { function(r); });
|
||||
#define INVOKE_MEMFN(function) \
|
||||
{ \
|
||||
QPointer<std::remove_reference<decltype(*this)>::type> meptr; \
|
||||
m_Ctx.Replay().AsyncInvoke([meptr](IReplayController *r) { \
|
||||
if(meptr) \
|
||||
meptr->function(r); \
|
||||
}); \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user