From fbb67d0e5247da88d7c403dc61b95244dcc6c7dc Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 23 May 2006 13:58:51 +0000 Subject: [PATCH] Guard against comparing invalid iterators, which produces an assertion git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index b1d27062f1..e25a936355 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -346,7 +346,7 @@ void wxPopupMenuWindow::SetCurrentItem(wxMenuItemIter node) void wxPopupMenuWindow::ChangeCurrent(wxMenuItemIter node) { - if ( node != m_nodeCurrent ) + if ( !m_nodeCurrent || (node != m_nodeCurrent) ) { wxMenuItemIter nodeOldCurrent = m_nodeCurrent; @@ -762,7 +762,7 @@ void wxPopupMenuWindow::ProcessMouseMove(const wxPoint& pt) // the window (see below) if ( node ) { - if ( node != m_nodeCurrent ) + if ( !m_nodeCurrent || (node != m_nodeCurrent) ) { ChangeCurrent(node); -- 2.45.2