Merge pull request #73838 from RevoluPowered/fix-editor-hanging-headlessly

Fix editor resource preview deadlocking with --headless mode
This commit is contained in:
Rémi Verschelde 2023-02-24 13:29:25 +01:00
commit 6c65ff82f2
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 4 additions and 2 deletions

View File

@ -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() {