From c730957c427680b9d0d823e7240cdf614d4a8c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 9 Oct 2018 09:52:23 +0200 Subject: [PATCH] Revert "Added a check in sort_custom thats test wether the given method exists." This reverts commit 6415454581c3ba0025da6b9bae42e060fa4e1508. That patch was correct but Object::has_method is not a reliable way to check if we can use the given method, as it doesn't support inner classes (#22838). --- core/array.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/core/array.cpp b/core/array.cpp index 9f09ddbe1582c..9708452850682 100644 --- a/core/array.cpp +++ b/core/array.cpp @@ -258,7 +258,6 @@ struct _ArrayVariantSortCustom { Array &Array::sort_custom(Object *p_obj, const StringName &p_function) { ERR_FAIL_NULL_V(p_obj, *this); - ERR_FAIL_COND_V(!p_obj->has_method(p_function), *this); SortArray avs; avs.compare.obj = p_obj;