diff --git a/src/core.cpp b/src/core.cpp index 197e5830b..0b5ff1f74 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -99,10 +99,11 @@ Core::~Core() toxTimer->stop(); coreThread->exit(0); - qApp->processEvents(); - coreThread->wait(); - if (coreThread->isRunning()) - coreThread->terminate(); + while (coreThread->isRunning()) + { + qApp->processEvents(); + coreThread->wait(500); + } if (tox) {