From 1f336255f5d35b44e3188b2ef714fb4db57b0535 Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Fri, 5 Dec 2008 20:52:39 +0000 Subject: [PATCH] fix shutdown of empty rose trees --- stasis/operations/lsmIterators.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/stasis/operations/lsmIterators.h b/stasis/operations/lsmIterators.h index 8d6b2d8..5f0fb6e 100644 --- a/stasis/operations/lsmIterators.h +++ b/stasis/operations/lsmIterators.h @@ -59,12 +59,16 @@ class gcIterator { freeIt(0), beginning_of_time_(beginning_of_time), ts_col_(ts_col) { - get_next(); - if(have_newest_) { - have_current_ = true; // needed by ++. - ++(*this); - // assert(have_current_); // Should pass; commented out for perf. - } + if(*i_ != *iend_) { + get_next(); + if(have_newest_) { + have_current_ = true; // needed by ++. + ++(*this); + // assert(have_current_); // Should pass; commented out for perf. + } + } else { + at_end_=true; + } } explicit gcIterator() : i_(0),