Check array count

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15157 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-11-27 21:19:53 +00:00
parent 12f532ae25
commit e7394a8320
3 changed files with 11 additions and 4 deletions

View file

@ -159,7 +159,7 @@
- (NSTabViewItem*) selectedTabViewItem
{
if (_selected_item == NSNotFound)
if (_selected_item == NSNotFound || [_items count] == 0)
return nil;
return [_items objectAtIndex: _selected_item];
}