summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-01-18 19:15:05 -0300
committerGitHub <noreply@github.com>2018-01-18 19:15:05 -0300
commit7369b0075e430f30a32b848e8a60c85f0b2ce8f2 (patch)
tree86ca61e1b50f8f843b94307ff9a517e2e37cbef4
parent598724c0430c54f50f411a35d38e028bd3fdf384 (diff)
parent67ae443c5696b96590ca4c32cb2828692e805b73 (diff)
Merge pull request #15851 from poke1024/preload-warnings
Suppress errors on autocompletion for preload()
-rw-r--r--modules/gdscript/gdscript_parser.cpp2
1 files changed, 1 insertions, 1 deletions
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()) {