summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}