Skip to content

Commit

Permalink
Fix crash when trying to save with no scenes and scripts open
Browse files Browse the repository at this point in the history
This could occur when attempting to save project settings when
no scenes or scripts are open (which is common in a brand new project).
  • Loading branch information
Calinou committed May 18, 2021
1 parent cc57bb9 commit 16876be
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions editor/plugins/script_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2281,8 +2281,7 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra

void ScriptEditor::save_current_script() {
ScriptEditorBase *current = _get_current_editor();

if (_test_script_times_on_disk()) {
if (!current || _test_script_times_on_disk()) {
return;
}

Expand Down

0 comments on commit 16876be

Please sign in to comment.