mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Merge pull request #67066 from timothyqiu/register-null
Validate input in `ScriptServer::register_language`
This commit is contained in:
commit
bea0cbbb4d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user