diff --git a/src/entt/meta/meta.hpp b/src/entt/meta/meta.hpp index 311368224..7d0459b55 100644 --- a/src/entt/meta/meta.hpp +++ b/src/entt/meta/meta.hpp @@ -1636,7 +1636,7 @@ public: } [[nodiscard]] explicit operator bool() const noexcept { - return static_cast(handle); + return (vtable != nullptr); } [[nodiscard]] bool operator==(const meta_iterator &other) const noexcept { @@ -1712,7 +1712,7 @@ public: } [[nodiscard]] explicit operator bool() const noexcept { - return static_cast(handle); + return (vtable != nullptr); } [[nodiscard]] bool operator==(const meta_iterator &other) const noexcept {