mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +08:00
Ref T786 Fixed dangling pointer in CSlot::singleShot
This commit is contained in:
@@ -108,11 +108,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
// does NOT return the values of m_function!
|
// does NOT return the values of m_function!
|
||||||
if (!m_object || !m_function) { return false; }
|
if (!m_object || !m_function) { return false; }
|
||||||
QTimer::singleShot(0, m_object.data(), [ = ]
|
QTimer::singleShot(0, m_object.data(), std::bind(*this, std::forward<Args>(args)...));
|
||||||
{
|
|
||||||
if (!m_object || !m_function) { return; }
|
|
||||||
m_function(args...);
|
|
||||||
});
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user