summaryrefslogtreecommitdiffstats
path: root/editor/editor_resource_preview.cpp
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2024-09-13 12:19:06 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2024-09-13 12:19:06 +0200
commitf31867d2b9e7b916e24683c024764bcc3d326a83 (patch)
treef67ea7143b5c9882325a3d834799bd620690e3f8 /editor/editor_resource_preview.cpp
parente3ddf3d44acc4d3f965278d01de6ca7fa3d646d3 (diff)
downloadredot-engine-f31867d2b9e7b916e24683c024764bcc3d326a83.tar.gz
EditorResourcePreview: Let loads complete after exit requested
Diffstat (limited to 'editor/editor_resource_preview.cpp')
-rw-r--r--editor/editor_resource_preview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index 956fdc5cfa..a50b2f3dcc 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -533,8 +533,10 @@ void EditorResourcePreview::stop() {
}
while (!exited.is_set()) {
+ // Sync pending work.
OS::get_singleton()->delay_usec(10000);
- RenderingServer::get_singleton()->sync(); //sync pending stuff, as thread may be blocked on rendering server
+ RenderingServer::get_singleton()->sync();
+ MessageQueue::get_singleton()->flush();
}
thread.wait_to_finish();