From 5d9ef6deecb199737608453d35198f7bd574cc9e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 21 Mar 2006 13:17:31 +0000 Subject: [PATCH] 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 --- include/wx/list.h | 3 +++ 1 file changed, 3 insertions(+) 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 ); \ } \ -- 2.45.2