diff options
author | Gordon MacPherson <gordon@gordonite.tech> | 2023-02-23 20:45:41 +0000 |
---|---|---|
committer | Gordon MacPherson <gordon@gordonite.tech> | 2023-02-23 20:57:19 +0000 |
commit | e395eaf4475cf8d8ae04cbbc91f0163849e0f802 (patch) | |
tree | eda7d6600fde32a74e39acbdda96cfab21358b4d /editor | |
parent | e930c8d3838280e40baabc4426bd8236f7ac50a3 (diff) |
Fix editor resource preview deadlocking with --headless mode
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_resource_preview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index db4d12c761..6eef4e5a5a 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -424,8 +424,10 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) { } void EditorResourcePreview::start() { - ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started."); - thread.start(_thread_func, this); + if (DisplayServer::get_singleton()->get_name() != "headless") { + ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started."); + thread.start(_thread_func, this); + } } void EditorResourcePreview::stop() { |