summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2021-07-23 12:44:35 +0200
committerRĂ©mi Verschelde <rverschelde@gmail.com>2021-08-13 09:57:46 +0200
commitea2489ce937d95f7103332c717c96aeb60d83271 (patch)
tree579bf4461e9cff80c012ed37340d56622dfd1e38
parenteadf9d92f97329d85f88dce1a6f8ea6866bf191b (diff)
Don't save project on startup in headless mode
-rw-r--r--editor/editor_node.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 30edbd1e87..74ee9099f2 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -613,8 +613,10 @@ void EditorNode::_notification(int p_what) {
_editor_select(EDITOR_3D);
}
- // Save the project after opening to mark it as last modified.
- ProjectSettings::get_singleton()->save();
+ // Save the project after opening to mark it as last modified, except in headless mode.
+ if (DisplayServer::get_singleton()->window_can_draw()) {
+ ProjectSettings::get_singleton()->save();
+ }
/* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */
} break;