summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-16 11:01:48 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-16 11:01:48 +0100
commit373cbbe7b20621795e3a09dd9e1d501894db72b1 (patch)
tree25c6a68775404b1fb5523d76204a7454387cc158
parente178042866e55d1ee043e46f3fa7176e3cb00982 (diff)
parentf579c0a79f4599687e1677dc5af9eb75e4be6b96 (diff)
Merge pull request #73375 from KoBeWi/save_us_all_from_crash
Fix Save All trying to save empty scene paths
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 6d747ba6a8..ccbc7c3d74 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -2518,7 +2518,7 @@ void ScriptEditor::save_all_scripts() {
} else {
// For built-in scripts, save their scenes instead.
const String scene_path = edited_res->get_path().get_slice("::", 0);
- if (!scenes_to_save.has(scene_path)) {
+ if (!scene_path.is_empty() && !scenes_to_save.has(scene_path)) {
scenes_to_save.push_back(scene_path);
}
}