X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/39c20230ba7ca49fbdfd7c558b4669ddc15ba4aa..5debbdcf7b6c6e493aa5c475fd2744a22b2bf4f9:/include/wx/string.h?ds=sidebyside diff --git a/include/wx/string.h b/include/wx/string.h index 04483f3e12..ac8c35b8bf 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -3010,7 +3010,7 @@ inline wxCStrData::wxCStrData(const wxCStrData& data) inline wxCStrData::~wxCStrData() { if ( m_owned ) - delete m_str; + delete wx_const_cast(wxString*, m_str); // cast to silence warnings } // simple cases for AsChar() and AsWChar(), the complicated ones are @@ -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()