Fix QPointer not being properly initialised

This commit is contained in:
baldurk
2023-05-16 17:30:11 +01:00
parent d57c1068bd
commit e7f3f571d9
+7 -7
View File
@@ -2752,11 +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) \
{ \
QPointer<std::remove_reference<decltype(*this)>::type> meptr; \
m_Ctx.Replay().AsyncInvoke([meptr](IReplayController *r) { \
if(meptr) \
meptr->function(r); \
}); \
#define INVOKE_MEMFN(function) \
{ \
QPointer<std::remove_reference<decltype(*this)>::type> meptr(this); \
m_Ctx.Replay().AsyncInvoke([meptr](IReplayController *r) { \
if(meptr) \
meptr->function(r); \
}); \
}