From 7bc030172e9d90e5c90b32f05624d5cf5070ab6d Mon Sep 17 00:00:00 2001 From: Hotkey Date: Tue, 4 Mar 2025 13:32:12 +0900 Subject: [PATCH] Fix crash when calling get_argument_count() on invalid Callable https://github.com/godotengine/godot/issues/103438 --- core/variant/callable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/variant/callable.cpp b/core/variant/callable.cpp index 402dc6823c..0603ea2732 100644 --- a/core/variant/callable.cpp +++ b/core/variant/callable.cpp @@ -188,7 +188,7 @@ int Callable::get_argument_count(bool *r_is_valid) const { if (is_custom()) { bool valid = false; return custom->get_argument_count(r_is_valid ? *r_is_valid : valid); - } else if (!is_null()) { + } else if (is_valid()) { return get_object()->get_method_argument_count(method, r_is_valid); } else { if (r_is_valid) {