Skip to content

Commit

Permalink
meta: if it's initialized, it's ok
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Dec 13, 2024
1 parent c8000f3 commit e343a24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/entt/meta/meta.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@ class meta_type {
*/
[[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);
}

/**
Expand Down

0 comments on commit e343a24

Please sign in to comment.