@@ -379,7 +379,7 @@ public:
* @return Estimated number of entities iterated by the view.
*/
[[nodiscard]] size_type size_hint() const noexcept {
- return view->size();
+ return view ? view->size() : size_type{};
}
/**
@@ -630,6 +630,8 @@ TEST(MultiComponentView, InvalidView) {
ASSERT_FALSE(view);
+ ASSERT_EQ(view.size_hint(), 0u);
+
entt::storage<int> storage;
view.storage(storage);