diff --git a/search/feature_offset_match.hpp b/search/feature_offset_match.hpp index aa609436d1..0e5f473395 100644 --- a/search/feature_offset_match.hpp +++ b/search/feature_offset_match.hpp @@ -173,8 +173,11 @@ public: template void ForEachResult(ToDo & toDo) const { - for (typename SetType::const_iterator i = m_prevSet->begin(); i != m_prevSet->end(); ++i) - toDo(*i); + if (m_prevSet) + { + for (typename SetType::const_iterator i = m_prevSet->begin(); i != m_prevSet->end(); ++i) + toDo(*i); + } } };