mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 04:20:46 +00:00
Added explicit check for item == nil.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21540 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ff1506b59c
commit
e8fe1e33a9
1 changed files with 3 additions and 0 deletions
|
@ -521,6 +521,9 @@ static NSImage *unexpandable = nil;
|
||||||
*/
|
*/
|
||||||
- (int)rowForItem: (id)item
|
- (int)rowForItem: (id)item
|
||||||
{
|
{
|
||||||
|
if(item == nil)
|
||||||
|
return -1;
|
||||||
|
|
||||||
int row = [_items indexOfObject: item];
|
int row = [_items indexOfObject: item];
|
||||||
return (row == NSNotFound) ? -1 : row;
|
return (row == NSNotFound) ? -1 : row;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue