mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 02:55:44 +08:00
T102 Fixed mistake that caused CWorkerPointer to delete the worker
immediately as soon as it starts.
This commit is contained in:
@@ -329,7 +329,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
if (!ptr || static_cast<const CContinuousWorker *>(ptr)->hasStarted()) { return; }
|
if (!ptr || static_cast<const CContinuousWorker *>(ptr)->hasStarted()) { return; }
|
||||||
m_strong.reset(ptr);
|
m_strong.reset(ptr);
|
||||||
QObject::connect(ptr, &CWorkerBase::aboutToStart, [this] { m_strong.reset(); });
|
QObject::connect(ptr, &CWorkerBase::aboutToStart, [this] { m_strong.release(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Construct a null pointer.
|
//! Construct a null pointer.
|
||||||
|
|||||||
Reference in New Issue
Block a user