summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript.cpp
diff options
context:
space:
mode:
authorClay John <claynjohn@gmail.com>2022-10-28 13:04:36 -0700
committerGitHub <noreply@github.com>2022-10-28 13:04:36 -0700
commit3fa339cfc43086dd795edc2153c4a13672b5c74e (patch)
tree79d709d76d67edf56db8b617b7e6dc8c0fd0a09a /modules/gdscript/gdscript.cpp
parent04ac91f786aaf55be488a82cf27ab2817a5b1686 (diff)
parentd0edd36f80d47e490331e1ef30f010f75220fb5f (diff)
downloadredot-engine-3fa339cfc43086dd795edc2153c4a13672b5c74e.tar.gz
Merge pull request #67849 from kdada/fix-built-in-script-crash
Fix built-in script path of GDScript to prevent crash
Diffstat (limited to 'modules/gdscript/gdscript.cpp')
-rw-r--r--modules/gdscript/gdscript.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 0a9dad04c7..b4da9c1224 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -1050,6 +1050,11 @@ Error GDScript::load_byte_code(const String &p_path) {
return ERR_COMPILATION_FAILED;
}
+void GDScript::set_path(const String &p_path, bool p_take_over) {
+ Script::set_path(p_path, p_take_over);
+ this->path = p_path;
+}
+
Error GDScript::load_source_code(const String &p_path) {
Vector<uint8_t> sourcef;
Error err;