Browse Source

view: check the index directly before invoking ::each

Michele Caini 2 years ago
parent
commit
83576bf94e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/entt/entity/view.hpp

+ 1 - 1
src/entt/entity/view.hpp

@@ -585,7 +585,7 @@ public:
      */
     template<typename Func>
     void each(Func func) const {
-        if(base_type::handle() != nullptr) {
+        if(this->index != sizeof...(Get)) {
             pick_and_each(func, std::index_sequence_for<Get...>{});
         }
     }