]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed assert when moving out of a menu
authorJulian Smart <julian@anthemion.co.uk>
Tue, 17 Oct 2006 17:18:57 +0000 (17:18 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 17 Oct 2006 17:18:57 +0000 (17:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/menu.cpp

index 0a29b8ada51ce113d7327748f4ac20037845e72d..ba228442fa3f4b0cdad986bd2e63897bbad421df 100644 (file)
@@ -347,7 +347,7 @@ void wxPopupMenuWindow::SetCurrentItem(wxMenuItemIter node)
 
 void wxPopupMenuWindow::ChangeCurrent(wxMenuItemIter node)
 {
-    if ( !m_nodeCurrent || (node != m_nodeCurrent) )
+    if ( !m_nodeCurrent || !node || (node != m_nodeCurrent) )
     {
         wxMenuItemIter nodeOldCurrent = m_nodeCurrent;