diff --git a/include/wx/string.h b/include/wx/string.h index 04483f3e12..0462f4f2e8 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -3126,7 +3126,7 @@ void wxStringIteratorNode::DoSet(const wxString *str, wxStringImpl::const_iterator *citer, wxStringImpl::iterator *iter) { - m_next = m_prev = NULL; + m_prev = NULL; m_iter = iter; m_citer = citer; m_str = str; @@ -3137,6 +3137,10 @@ void wxStringIteratorNode::DoSet(const wxString *str, if ( m_next ) m_next->m_prev = this; } + else + { + m_next = NULL; + } } void wxStringIteratorNode::clear()