summaryrefslogtreecommitdiffstats
path: root/editor/editor_resource_preview.cpp
diff options
context:
space:
mode:
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 71865f7e8c..47caa4fef9 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -531,8 +531,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();