mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 21:10:48 +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
a9204dade5
commit
6b7156882f
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>
|
2010-12-09 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Source/NSMatrix.m (-setState:atRow:column:): Fix bug where the
|
* Source/NSMatrix.m (-setState:atRow:column:): Fix bug where the
|
||||||
|
|
|
@ -407,7 +407,10 @@ static NSMapTable *viewInfo = 0;
|
||||||
|
|
||||||
- (NSMenuItemCell*) menuItemCellForItemAtIndex: (int)index
|
- (NSMenuItemCell*) menuItemCellForItemAtIndex: (int)index
|
||||||
{
|
{
|
||||||
return [_itemCells objectAtIndex: index];
|
if (index < [_itemCells count])
|
||||||
|
return [_itemCells objectAtIndex: index];
|
||||||
|
else
|
||||||
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSMenuView*) attachedMenuView
|
- (NSMenuView*) attachedMenuView
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue