Merge pull request #73375 from KoBeWi/save_us_all_from_crash

Fix Save All trying to save empty scene paths
This commit is contained in:
Rémi Verschelde 2023-02-16 11:01:48 +01:00
commit 373cbbe7b2
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -2518,7 +2518,7 @@ void ScriptEditor::save_all_scripts() {
} else { } else {
// For built-in scripts, save their scenes instead. // For built-in scripts, save their scenes instead.
const String scene_path = edited_res->get_path().get_slice("::", 0); 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); scenes_to_save.push_back(scene_path);
} }
} }