X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e40865607cd25e82e438fe2b5c9d54c397e1e84c..48d2ab90ee02b7e2441f33fa8575bf51f56a364e:/src/mac/frame.cpp diff --git a/src/mac/frame.cpp b/src/mac/frame.cpp index 4fe1aec422..4d83421744 100644 --- a/src/mac/frame.cpp +++ b/src/mac/frame.cpp @@ -132,7 +132,8 @@ bool wxFrame::Enable(bool enable) if ( m_frameMenuBar && m_frameMenuBar == wxMenuBar::MacGetInstalledMenuBar() ) { - for ( int i = 0 ; i < m_frameMenuBar->GetMenuCount() ; ++ i ) + int iMaxMenu = m_frameMenuBar->GetMenuCount(); + for ( int i = 0 ; i < iMaxMenu ; ++ i ) { m_frameMenuBar->EnableTop( i , enable ) ; }