From: Vadim Zeitlin Date: Tue, 21 Mar 2006 13:17:31 +0000 (+0000) Subject: return NULL (and not invalid) iterator from compatibility_iterator::GetPrevious(... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5d9ef6deecb199737608453d35198f7bd574cc9e return NULL (and not invalid) iterator from compatibility_iterator::GetPrevious() when we're at the start of the list (see patch 1445506) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/list.h b/include/wx/list.h index 7d1f0ebc1a..00659a4f6b 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -190,6 +190,9 @@ private: } \ compatibility_iterator GetPrevious() const \ { \ + if ( m_iter == m_list->begin() ) \ + return compatibility_iterator(); \ + \ iterator i = m_iter; \ return compatibility_iterator( m_list, --i ); \ } \