summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ix/CPP/src/cpplinq/linq_where.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Ix/CPP/src/cpplinq/linq_where.hpp b/Ix/CPP/src/cpplinq/linq_where.hpp
index 4f66ba7..9b3d936 100644
--- a/Ix/CPP/src/cpplinq/linq_where.hpp
+++ b/Ix/CPP/src/cpplinq/linq_where.hpp
@@ -24,7 +24,7 @@ namespace cpplinq
cursor(const inner_cursor& cur, const Predicate& p) : cur(cur), pred(p)
{
- if (!pred(cur.get())) {
+ if (!cur.empty() && !pred(cur.get())) {
this->inc();
}
}