mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Prevent trying to retrieve a menuCell that is out of range.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31729 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
51823d2d82
commit
77495ccde1
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-12-13 Jonathan Gillaspie <jonathan.gillaspie@testplant.com>
|
||||
|
||||
* Source/NSMenuView.m:
|
||||
Prevent trying to retrieve a menuCell that is out of range.
|
||||
|
||||
2010-12-09 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSMatrix.m (-setState:atRow:column:): Fix bug where the
|
||||
|
|
|
@ -407,7 +407,10 @@ static NSMapTable *viewInfo = 0;
|
|||
|
||||
- (NSMenuItemCell*) menuItemCellForItemAtIndex: (int)index
|
||||
{
|
||||
return [_itemCells objectAtIndex: index];
|
||||
if (index < [_itemCells count])
|
||||
return [_itemCells objectAtIndex: index];
|
||||
else
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSMenuView*) attachedMenuView
|
||||
|
|
Loading…
Reference in a new issue