X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cf6674a42d28718214ed392b678b9a47cafd10fc..bd330a69c9555c29c6fc448a61e58e0d49402c47:/src/mac/carbon/uma.cpp diff --git a/src/mac/carbon/uma.cpp b/src/mac/carbon/uma.cpp index 4fe99c0e6a..dbdb59341f 100644 --- a/src/mac/carbon/uma.cpp +++ b/src/mac/carbon/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 ) {