From 67ae443c5696b96590ca4c32cb2828692e805b73 Mon Sep 17 00:00:00 2001 From: Bernhard Liebl Date: Thu, 18 Jan 2018 22:25:29 +0100 Subject: Suppress errors on autocompletion for preload() --- modules/gdscript/gdscript_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index ed21194dd3..75fb7e15c4 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/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()) { -- cgit v1.2.3