From e343a24966a7742859ff1cd3356bb31df8054103 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 13 Dec 2024 14:46:05 +0100 Subject: [PATCH] meta: if it's initialized, it's ok --- src/entt/meta/meta.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entt/meta/meta.hpp b/src/entt/meta/meta.hpp index b1fdafb72..61267a127 100644 --- a/src/entt/meta/meta.hpp +++ b/src/entt/meta/meta.hpp @@ -1304,7 +1304,7 @@ public: */ [[nodiscard]] bool can_cast(const meta_type &other) const noexcept { // casting this is UB in all cases but we aren't going to use the resulting pointer, so... - return (other.node.info != nullptr) && (internal::try_cast(internal::meta_context::from(*ctx), node, *other.node.info, this) != nullptr); + return other && (internal::try_cast(internal::meta_context::from(*ctx), node, *other.node.info, this) != nullptr); } /**