fix worker checks if thread object exists before attempting join
This commit is contained in:
parent
8855664d65
commit
e85ce57b82
1 changed files with 2 additions and 1 deletions
|
|
@ -39,7 +39,8 @@ void Worker::cancel_current() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::join() {
|
void Worker::join() {
|
||||||
worker_thread->join();
|
if (this->worker_thread != nullptr) return;
|
||||||
|
this->worker_thread->join();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::thread_run() {
|
void Worker::thread_run() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue