summaryrefslogtreecommitdiff
path: root/Ix
diff options
context:
space:
mode:
authorKirk Shoop (MS Open Tech) <kirk.shoop@microsoft.com>2013-09-27 07:12:53 -0700
committerKirk Shoop (MS Open Tech) <kirk.shoop@microsoft.com>2013-09-27 07:12:53 -0700
commit06431b9a492fec17ad539416464c54a6f05c5447 (patch)
treec3c114687674095af613c84acb16d45932936d63 /Ix
parenta9c2c210309a93899c22ee2ccdaf9d16f5e6716f (diff)
downloadRxCpp-06431b9a492fec17ad539416464c54a6f05c5447.tar.gz
fix bug when using where on an empty collection
Diffstat (limited to 'Ix')
-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();
}
}