Fix editor resource preview deadlocking with --headless mode

This commit is contained in:
Gordon MacPherson 2023-02-23 20:45:41 +00:00
parent e930c8d383
commit e395eaf447

View File

@ -424,8 +424,10 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) {
} }
void EditorResourcePreview::start() { void EditorResourcePreview::start() {
ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started."); if (DisplayServer::get_singleton()->get_name() != "headless") {
thread.start(_thread_func, this); ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started.");
thread.start(_thread_func, this);
}
} }
void EditorResourcePreview::stop() { void EditorResourcePreview::stop() {