renderer: destroy surface in main thread

This commit is contained in:
itsmattkc
2020-11-25 08:59:14 +11:00
parent 1254726079
commit 0eda91a0cb
7 changed files with 21 additions and 6 deletions
+3 -1
View File
@@ -58,12 +58,14 @@ void RendererThreadWrapper::DestroyInternal()
{
if (thread_) {
QMetaObject::invokeMethod(inner_, "DestroyInternal", Qt::BlockingQueuedConnection);
inner_ = nullptr;
thread_->quit();
thread_->wait();
delete thread_;
thread_ = nullptr;
// Destroy in main thread
inner_->PostDestroy();
}
}