Fix wait for thread not started

This commit is contained in:
Samuele Panzeri 2023-04-27 18:34:30 +02:00
parent 240ed28291
commit 4aaa2e6477
16 changed files with 45 additions and 18 deletions

View file

@ -237,7 +237,9 @@ void RenderingServerDefault::init() {
void RenderingServerDefault::finish() {
if (create_thread) {
command_queue.push(this, &RenderingServerDefault::_thread_exit);
thread.wait_to_finish();
if (thread.is_started()) {
thread.wait_to_finish();
}
} else {
_finish();
}