fix: crash on app exit due to running thread (#1)
https://doc.qt.io/qt-6/qthread.html\#dtor.QThread
This commit was merged in pull request #1.
This commit is contained in:
+2
-1
@@ -104,9 +104,10 @@ Broadcaster::Broadcaster(QObject *parent) : QObject(parent)
|
||||
|
||||
Broadcaster::~Broadcaster()
|
||||
{
|
||||
if (m_worker)
|
||||
if (m_worker && m_worker->isRunning())
|
||||
{
|
||||
m_worker->requestInterruption();
|
||||
m_worker->wait();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user