[run_set] fix invalid iterator operations (#113)
This commit is contained in:
parent
9837feaee5
commit
788f507e46
@ -64,13 +64,13 @@ namespace base {
|
||||
|
||||
typename rset::const_iterator it = runs_.lower_bound(run<T>(v));
|
||||
|
||||
if (it->begin_ == v)
|
||||
if (it != runs_.end() && it->begin_ == v)
|
||||
return true;
|
||||
|
||||
if (it != runs_.begin()) {
|
||||
it--;
|
||||
|
||||
if (it != runs_.end())
|
||||
return it->contains(v);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user