Skip to content

[OrPostingIterator] Fix nullptr handling

Igor Poboiko requested to merge poboiko/baloo:iterator-nullptr into master

QVector::end() iterator gets invalidated when QVector is modified via QVector::erase(), so don't store it.

I'm not even sure why the test worked in the first place, that should be undefined behavior.

For example, if vector ends with nullptr, the current code crashed with ASSERT failure in QVector::erase: "The specified iterator argument 'aend' is invalid" (modified test scenario for this particular case)

Merge request reports