1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +00:00

Fix Editor crash during first scan in headless import mode.

This commit is contained in:
Mounir Tohami
2025-07-26 14:03:45 +03:00
parent 0dd9178269
commit aa086fa0d5
3 changed files with 4 additions and 8 deletions

View File

@@ -5616,14 +5616,6 @@ void EditorNode::_editor_file_dialog_unregister(EditorFileDialog *p_dialog) {
Vector<EditorNodeInitCallback> EditorNode::_init_callbacks;
void EditorNode::_begin_first_scan() {
// In headless mode, scan right away.
// This allows users to continue using `godot --headless --editor --quit` to prepare a project.
if (!DisplayServer::get_singleton()->window_can_draw()) {
OS::get_singleton()->benchmark_begin_measure("Editor", "First Scan");
EditorFileSystem::get_singleton()->scan();
return;
}
if (!waiting_for_first_scan) {
return;
}