Skip to content

Commit

Permalink
Merge pull request godotengine#48818 from Calinou/fix-script-editor-s…
Browse files Browse the repository at this point in the history
…ave-crash

Fix crash when trying to save with no scenes and scripts open
  • Loading branch information
akien-mga authored May 19, 2021
2 parents 8348332 + 16876be commit f1f5b92
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 f1f5b92

Please sign in to comment.