summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-08 13:56:18 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-10-08 13:56:18 +0200
commitbea0cbbb4d255e89acee7a1a13db42c2fcf64105 (patch)
treed7c5493961317c62020e22caefbde102ed9361c3 /core
parent2b376437a293971432f5e25487a6e3e79a8e8e4e (diff)
parent48e0688d8f789b961cd17f9476aae8e4661b7238 (diff)
Merge pull request #67066 from timothyqiu/register-null
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;
}