Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
Fix app shutdown crash
Browse files Browse the repository at this point in the history
Fixes `FATAL: yio QThread: Destroyed while thread is still running`.
Part of #337
  • Loading branch information
zehnm committed Nov 22, 2019
1 parent 0919f7e commit 35b8dbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions sources/bluetootharea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ BluetoothArea::BluetoothArea(QObject *parent) : QObject(parent)
{
}

BluetoothArea::~BluetoothArea() {
if (m_thread.isRunning()) {
m_thread.exit();
m_thread.wait();
}
}

void BluetoothArea::init(const QVariantMap &config)
{
// read from config.json
Expand Down
2 changes: 1 addition & 1 deletion sources/bluetootharea.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class BluetoothArea : public QObject


explicit BluetoothArea(QObject *parent = nullptr);
virtual ~BluetoothArea() {}
virtual ~BluetoothArea();


signals:
Expand Down

0 comments on commit 35b8dbc

Please sign in to comment.