meta: if it's initialized, it's ok

This commit is contained in:
Michele Caini
2024-12-13 14:46:05 +01:00
parent c8000f3e87
commit e343a24966
+1 -1
View File
@@ -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);
}
/**