Corrected bug in previous change. In [itemAtIndex:] the index 0

was handled wrong.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17668 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2003-09-14 10:40:06 +00:00
parent 9862b53e77
commit 06d6e26b2d

View file

@ -346,7 +346,7 @@ static NSImage *_pbc_image[2];
- (id <NSMenuItem>) itemAtIndex: (int)index
{
if ((index > 0) && (index < [_menu numberOfItems]))
if ((index >= 0) && (index < [_menu numberOfItems]))
{
return [_menu itemAtIndex: index];
}
@ -418,7 +418,7 @@ static NSImage *_pbc_image[2];
//[super setMenuItem: item];
ASSIGN (_menuItem, item);
if ([_menuItem image] == nil)
{
[_menuItem setImage: image];