ソースを参照

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

Fix editor resource preview deadlocking with --headless mode
Rémi Verschelde 2 年 前
コミット
6c65ff82f2
1 ファイル変更4 行追加2 行削除
  1. 4 2
      editor/editor_resource_preview.cpp

+ 4 - 2
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() {