diff options
author | Kirk Shoop (MS Open Tech) <kirk.shoop@microsoft.com> | 2013-09-27 07:12:53 -0700 |
---|---|---|
committer | Kirk Shoop (MS Open Tech) <kirk.shoop@microsoft.com> | 2013-09-27 07:12:53 -0700 |
commit | 06431b9a492fec17ad539416464c54a6f05c5447 (patch) | |
tree | c3c114687674095af613c84acb16d45932936d63 /Ix | |
parent | a9c2c210309a93899c22ee2ccdaf9d16f5e6716f (diff) | |
download | RxCpp-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.hpp | 2 |
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(); } } |