* 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:
Felipe A. Rodriguez 1998-09-03 15:00:37 +00:00
parent 18bffd34b0
commit 8132c8826a
2 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Thur Sept 3 1998 Felipe A. Rodriguez <far@ix.netcom.com>
* NSMenuItem.m in copyWithZone: fixed bug which crashed menus two or more
deep when said menus are opened and detached twice
Mon Aug 31 16:31:12 1998 Adam Fedor <fedor@ultra.doc.com>
* Headers/gnustep/gui/DPSOperators.h: Define enough stuff so that

View file

@ -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;
}