X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cf6674a42d28718214ed392b678b9a47cafd10fc..5dbb17e27f5a64c7390c54223abce40ae32ecaa8:/src/mac/uma.cpp?ds=sidebyside diff --git a/src/mac/uma.cpp b/src/mac/uma.cpp index 4fe99c0e6a..dbdb59341f 100644 --- a/src/mac/uma.cpp +++ b/src/mac/uma.cpp @@ -589,7 +589,6 @@ OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) } static OSStatus helpMenuStatus = noErr ; -static MenuRef helpMenuHandle = NULL ; static MenuItemIndex firstCustomItemIndex = 0 ; OSStatus UMAGetHelpMenu( @@ -599,13 +598,11 @@ OSStatus UMAGetHelpMenu( #if TARGET_CARBON return HMGetHelpMenu( outHelpMenu , outFirstCustomItemIndex ) ; #else - if ( helpMenuHandle == NULL ) + MenuRef helpMenuHandle ; + helpMenuStatus = HMGetHelpMenuHandle( &helpMenuHandle ) ; + if ( firstCustomItemIndex == 0 && helpMenuStatus == noErr ) { - helpMenuStatus = HMGetHelpMenuHandle( &helpMenuHandle ) ; - if ( helpMenuStatus == noErr ) - { - firstCustomItemIndex = CountMenuItems( helpMenuHandle ) + 1 ; - } + firstCustomItemIndex = CountMenuItems( helpMenuHandle ) + 1 ; } if ( outFirstCustomItemIndex ) {