Parcourir la source

Fix crash when calling get_argument_count() on invalid Callable

https://github.com/godotengine/godot/issues/103438
Hotkey il y a 5 mois
Parent
commit
7bc030172e
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      core/variant/callable.cpp

+ 1 - 1
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) {