mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-25 17:43:44 +00:00
Fixing bug 444128, |MacApplicationDelegate| in toolkit throws ObjC exception when creating a |NSMenuItem| with a |nil| |NSString *|. r=josh, sr=roc
This commit is contained in:
parent
997038bbf3
commit
6d9641aace
@ -245,9 +245,12 @@ static NSWindow* GetCocoaWindowForXULWindow(nsISupports *aXULWindow)
|
||||
NSWindow *cocoaWindow = GetCocoaWindowForXULWindow(xulWindow);
|
||||
if (!cocoaWindow) continue;
|
||||
|
||||
NSString *windowTitle = [cocoaWindow title];
|
||||
if (!windowTitle) continue;
|
||||
|
||||
// Now, create a menu item, and add it to the menu
|
||||
NSMenuItem *menuItem = [[NSMenuItem alloc]
|
||||
initWithTitle:[cocoaWindow title]
|
||||
initWithTitle:windowTitle
|
||||
action:@selector(dockMenuItemSelected:)
|
||||
keyEquivalent:@""];
|
||||
[menuItem setTarget:self];
|
||||
|
Loading…
Reference in New Issue
Block a user