Fix crash when trying to save with no scenes and scripts open

This could occur when attempting to save project settings when
no scenes or scripts are open (which is common in a brand new project).

(cherry picked from commit 16876bec76)
This commit is contained in:
Hugo Locurcio 2021-05-18 19:43:54 +02:00 committed by Rémi Verschelde
parent a92dd585f7
commit a45db4c208
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 2 deletions

View File

@ -2151,8 +2151,7 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
void ScriptEditor::save_current_script() { void ScriptEditor::save_current_script() {
ScriptEditorBase *current = _get_current_editor(); ScriptEditorBase *current = _get_current_editor();
if (!current || _test_script_times_on_disk()) {
if (_test_script_times_on_disk()) {
return; return;
} }