mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 390707. Don't leak mNativeMenuItem, fixes wicked Mac crash. patch by jag, r=hwaara,josh,sr=vlad
This commit is contained in:
parent
1b132c0201
commit
5b4693aaa4
@ -297,6 +297,7 @@ nsresult nsMenuX::AddMenu(nsIMenu * aMenu)
|
||||
PRBool enabled;
|
||||
aMenu->GetEnabled(&enabled);
|
||||
NSString *newCocoaLabelString = MenuHelpersX::CreateTruncatedCocoaLabel(label);
|
||||
[mNativeMenuItem release];
|
||||
mNativeMenuItem = [[NSMenuItem alloc] initWithTitle:newCocoaLabelString action:nil keyEquivalent:@""];
|
||||
[mNativeMenuItem setEnabled:enabled];
|
||||
[mMacMenu addItem:mNativeMenuItem];
|
||||
|
Loading…
Reference in New Issue
Block a user