summaryrefslogtreecommitdiff
path: root/modules/gdscript/gd_script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/gd_script.cpp')
-rw-r--r--modules/gdscript/gd_script.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp
index dcc0e24098..1dcc442234 100644
--- a/modules/gdscript/gd_script.cpp
+++ b/modules/gdscript/gd_script.cpp
@@ -615,6 +615,11 @@ Error GDScript::reload(bool p_keep_state) {
if (basedir != "")
basedir = basedir.get_base_dir();
+ if (basedir.find("res://") == -1 && basedir.find("user://") == -1) {
+ //loading a template, don't parse
+ return OK;
+ }
+
valid = false;
GDParser parser;
Error err = parser.parse(source, basedir, false, path);