diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-24 13:29:25 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-24 13:29:25 +0100 |
commit | 6c65ff82f2695c38af5d25397da7314a8b5de1f8 (patch) | |
tree | 8ed97e3c8ee0755426d5e9edb65cbb4adc53960d | |
parent | 18053a68cb5fb500e851591d246f2b4a737c450d (diff) | |
parent | e395eaf4475cf8d8ae04cbbc91f0163849e0f802 (diff) |
Merge pull request #73838 from RevoluPowered/fix-editor-hanging-headlessly
Fix editor resource preview deadlocking with --headless mode
-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() { |