summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2022-10-08 14:12:25 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2022-10-08 14:12:25 +0800
commit48e0688d8f789b961cd17f9476aae8e4661b7238 (patch)
tree697b1f0a0040d0f6a493c6251d0238143fd2324d /core
parent18177828ad97286ca88cbdcfb763c967858d051b (diff)
Validate input in `ScriptServer::register_language`
Diffstat (limited to 'core')
-rw-r--r--core/object/script_language.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp
index 5a3413512d..9e26289e66 100644
--- a/core/object/script_language.cpp
+++ b/core/object/script_language.cpp
@@ -166,6 +166,7 @@ ScriptLanguage *ScriptServer::get_language(int p_idx) {
}
void ScriptServer::register_language(ScriptLanguage *p_language) {
+ ERR_FAIL_NULL(p_language);
ERR_FAIL_COND(_language_count >= MAX_LANGUAGES);
_languages[_language_count++] = p_language;
}