summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp/core
diff options
context:
space:
mode:
Diffstat (limited to 'include/godot_cpp/core')
-rw-r--r--include/godot_cpp/core/method_bind.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/godot_cpp/core/method_bind.hpp b/include/godot_cpp/core/method_bind.hpp
index 1b51722..5247998 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...>(p_arg, pi);
+ if (p_arg >= 0 && p_arg < (int)sizeof...(P)) {
+ call_get_argument_type_info<P...>(p_arg, pi);
+ } else {
+ pi = PropertyInfo();
+ }
return pi;
}
#if defined(__GNUC__) && !defined(__clang__)