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
This commit is contained in:
parent
45e13c7fb6
commit
fbb67d0e52
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user