mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:00:38 +00:00
* NSMenuItem.m in copyWithZone: fixed bug which crashed menus two or more
deep when said menus are opened and detached twice git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2955 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
649eea0083
commit
6bbde41d9c
2 changed files with 9 additions and 4 deletions
|
@ -84,10 +84,10 @@ static BOOL usesUserKeyEquivalents = YES;
|
|||
NSDebugLog (@"menu item '%@' copy", [self title]);
|
||||
copy->representedObject = [representedObject retain];
|
||||
copy->hasSubmenu = hasSubmenu;
|
||||
if (hasSubmenu) {
|
||||
id submenu = [[target copyWithZone:zone] autorelease];
|
||||
copy->target = [submenu retain];
|
||||
}
|
||||
if (hasSubmenu) { // recursive call
|
||||
id submenu = [target copyWithZone:zone]; // to create our
|
||||
copy->target = [submenu retain]; // submenus
|
||||
}
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue