You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
Fix Editor crash during first scan in headless import mode.
This commit is contained in:
@@ -950,6 +950,7 @@ void EditorData::clear_edited_scenes() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
edited_scene.clear();
|
edited_scene.clear();
|
||||||
|
SceneTree::get_singleton()->set_edited_scene_root(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorData::set_plugin_window_layout(Ref<ConfigFile> p_layout) {
|
void EditorData::set_plugin_window_layout(Ref<ConfigFile> p_layout) {
|
||||||
|
|||||||
@@ -5616,14 +5616,6 @@ void EditorNode::_editor_file_dialog_unregister(EditorFileDialog *p_dialog) {
|
|||||||
Vector<EditorNodeInitCallback> EditorNode::_init_callbacks;
|
Vector<EditorNodeInitCallback> EditorNode::_init_callbacks;
|
||||||
|
|
||||||
void EditorNode::_begin_first_scan() {
|
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) {
|
if (!waiting_for_first_scan) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1653,6 +1653,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||||||
upwards = true;
|
upwards = true;
|
||||||
} else if (arg == "--quit") { // Auto quit at the end of the first main loop iteration
|
} else if (arg == "--quit") { // Auto quit at the end of the first main loop iteration
|
||||||
quit_after = 1;
|
quit_after = 1;
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
|
wait_for_import = true;
|
||||||
|
#endif
|
||||||
} else if (arg == "--quit-after") { // Quit after the given number of iterations
|
} else if (arg == "--quit-after") { // Quit after the given number of iterations
|
||||||
if (N) {
|
if (N) {
|
||||||
quit_after = N->get().to_int();
|
quit_after = N->get().to_int();
|
||||||
|
|||||||
Reference in New Issue
Block a user