mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +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!
|
||||
if (!m_object || !m_function) { return false; }
|
||||
QTimer::singleShot(0, m_object.data(), [ = ]
|
||||
{
|
||||
if (!m_object || !m_function) { return; }
|
||||
m_function(args...);
|
||||
});
|
||||
QTimer::singleShot(0, m_object.data(), std::bind(*this, std::forward<Args>(args)...));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user