X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f250cb6e607e3b0b9416883ac91958c9755c549..43ff861df48f0837dac98005dd397c5f127ca136:/include/wx/list.h diff --git a/include/wx/list.h b/include/wx/list.h index e6fd24d74b..8f0c86f276 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -821,15 +821,15 @@ private: ptrop \ itor& operator++() \ { \ - if (m_node) \ - m_node = m_node->GetNext(); \ + wxASSERT_MSG( m_node, wxT("uninitialized iterator") ); \ + m_node = m_node->GetNext(); \ return *this; \ } \ const itor operator++(int) \ { \ itor tmp = *this; \ - if (m_node) \ - m_node = m_node->GetNext(); \ + wxASSERT_MSG( m_node, wxT("uninitialized iterator") ); \ + m_node = m_node->GetNext(); \ return tmp; \ } \ itor& operator--() \ @@ -874,15 +874,15 @@ private: ptrop \ itor& operator++() \ { \ - if (m_node) \ - m_node = m_node->GetNext(); \ + wxASSERT_MSG( m_node, wxT("uninitialized iterator") ); \ + m_node = m_node->GetNext(); \ return *this; \ } \ const itor operator++(int) \ { \ itor tmp = *this; \ - if (m_node) \ - m_node = m_node->GetNext(); \ + wxASSERT_MSG( m_node, wxT("uninitialized iterator") ); \ + m_node = m_node->GetNext(); \ return tmp; \ } \ itor& operator--() \