diff --git a/core/variant/binder_common.h b/core/variant/binder_common.h index 86bbf432660..830e0a5cbd5 100644 --- a/core/variant/binder_common.h +++ b/core/variant/binder_common.h @@ -122,6 +122,18 @@ struct VariantObjectClassChecker { } }; +template +class Ref; + +template +struct VariantObjectClassChecker &> { + static _FORCE_INLINE_ bool check(const Variant &p_variant) { + Object *obj = p_variant; + const Ref node = p_variant; + return node.ptr() || !obj; + } +}; + template <> struct VariantObjectClassChecker { static _FORCE_INLINE_ bool check(const Variant &p_variant) {