]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/uma.cpp
compilation fix
[wxWidgets.git] / src / mac / carbon / uma.cpp
index 4fe99c0e6a8d7ce5eac08d6cc0df0177b2f3aad1..dbdb59341f67579a89479f8499342cb48602a16e 100644 (file)
@@ -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 )
   {