summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHein-Pieter van Braam-Stewart <hp@tmm.cx>2019-05-30 23:05:44 -0700
committerK. S. Ernest (iFIre) Lee <ernest.lee@chibifire.com>2019-06-26 08:02:49 -0700
commitd1dbbd6515b7710594a406010177aa23e6b766b0 (patch)
treeb60a2d18ea6f7616b2a9df91be8a3b5c91130090
parentcb8d95dd4bc16fa014af7446abf7855255a7bf15 (diff)
Make sure that the resource previewer does not hang on exit
-rw-r--r--editor/editor_resource_preview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index 6cca0a0ffa..f2e4d1086b 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -218,6 +218,7 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
void EditorResourcePreview::_thread() {
#ifndef SERVER_ENABLED
+ exited = false;
while (!exit) {
preview_sem->wait();
@@ -452,8 +453,8 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) {
void EditorResourcePreview::start() {
ERR_FAIL_COND(thread);
thread = Thread::create(_thread_func, this);
- exited = false;
}
+
void EditorResourcePreview::stop() {
if (thread) {
exit = true;