소스 검색

Merge pull request #48818 from Calinou/fix-script-editor-save-crash

Fix crash when trying to save with no scenes and scripts open
Rémi Verschelde 4 년 전
부모
커밋
f1f5b92b8e
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      editor/plugins/script_editor_plugin.cpp

+ 1 - 2
editor/plugins/script_editor_plugin.cpp

@@ -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;
 	}