diff --git a/src/core/core.cpp b/src/core/core.cpp index 4b6415caf..d870950a9 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -107,11 +107,10 @@ Core::~Core() if (coreThread->isRunning()) { if (QThread::currentThread() == coreThread) - stopTimers(); + killTimers(); else QMetaObject::invokeMethod(this, "stopTimers", Qt::BlockingQueuedConnection); } - delete toxTimer; coreThread->exit(0); while (coreThread->isRunning()) { @@ -1248,8 +1247,9 @@ void Core::resetCallSources() } } -void Core::stopTimers() +void Core::killTimers() { assert(QThread::currentThread() == coreThread); toxTimer->stop(); + delete toxTimer; } diff --git a/src/core/core.h b/src/core/core.h index f963d221e..05d044ec7 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -286,7 +286,7 @@ private: void deadifyTox(); private slots: - void stopTimers(); ///< Must only be called from the Core thread + void killTimers(); ///< Must only be called from the Core thread private: Tox* tox;