Set net manager thread to delete itself on close

* Due to the way Qt works, the owning object acts as if it lives on the thread
  which in this case is running an event loop that tries to delete itself.
This commit is contained in:
baldurk
2026-08-27 17:29:38 +01:00
parent 1e06175da7
commit 61d9aafb1b
+1 -1
View File
@@ -367,6 +367,7 @@ MainWindow::MainWindow(ICaptureContext &ctx) : QMainWindow(NULL), ui(new Ui::Mai
delete m_NetWorker;
});
m_NetManagerThread->moveObjectToThread(m_NetWorker);
m_NetManagerThread->selfDelete(true);
m_NetManagerThread->start();
m_NetManagerThread->thread()->setPriority(QThread::LowPriority);
@@ -597,7 +598,6 @@ MainWindow::~MainWindow()
{
// close the network manager thread
m_NetManagerThread->thread()->quit();
m_NetManagerThread->deleteLater();
m_Ctx.Replay().DisconnectFromRemoteServer();