diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/variant/variant_construct.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/variant/variant_construct.cpp b/core/variant/variant_construct.cpp index 52f9f6060e..f0c9e52b46 100644 --- a/core/variant/variant_construct.cpp +++ b/core/variant/variant_construct.cpp @@ -773,6 +773,7 @@ void Variant::_unregister_variant_constructors() { } void Variant::construct(Variant::Type p_type, Variant &base, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { + ERR_FAIL_INDEX(p_type, Variant::VARIANT_MAX); uint32_t s = construct_data[p_type].size(); for (uint32_t i = 0; i < s; i++) { int argc = construct_data[p_type][i].argument_count; |