Przeglądaj źródła

Suppress errors on autocompletion for preload()

Bernhard Liebl 7 lat temu
rodzic
commit
67ae443c56
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      modules/gdscript/gdscript_parser.cpp

+ 1 - 1
modules/gdscript/gdscript_parser.cpp

@@ -460,7 +460,7 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
 				//this can be too slow for just validating code
 				if (for_completion && ScriptCodeCompletionCache::get_singleton()) {
 					res = ScriptCodeCompletionCache::get_singleton()->get_cached_resource(path);
-				} else {
+				} else if (FileAccess::exists(path)) {
 					res = ResourceLoader::load(path);
 				}
 				if (!res.is_valid()) {