diff --git a/include/godot_cpp/core/method_bind.hpp b/include/godot_cpp/core/method_bind.hpp index 1b51722a..52479986 100644 --- a/include/godot_cpp/core/method_bind.hpp +++ b/include/godot_cpp/core/method_bind.hpp @@ -600,7 +600,11 @@ protected: virtual GDNativePropertyInfo gen_argument_type_info(int p_arg) const { GDNativePropertyInfo pi; - call_get_argument_type_info(p_arg, pi); + if (p_arg >= 0 && p_arg < (int)sizeof...(P)) { + call_get_argument_type_info(p_arg, pi); + } else { + pi = PropertyInfo(); + } return pi; } #if defined(__GNUC__) && !defined(__clang__)