浏览代码

remove warnings if a script is missing and can't be opened

Juan Linietsky 9 年之前
父节点
当前提交
d8c31e0e74
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      tools/editor/plugins/script_editor_plugin.cpp

+ 2 - 0
tools/editor/plugins/script_editor_plugin.cpp

@@ -2411,6 +2411,8 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {
 	for(int i=0;i<scripts.size();i++) {
 
 		String path = scripts[i];
+		if (!FileAccess::exists(path))
+			continue;
 		Ref<Script> scr = ResourceLoader::load(path);
 		if (scr.is_valid()) {
 			edit(scr);