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

@ -1,3 +1,12 @@
2002-11-27 Adam Fedor <fedor@gnu.org>
* Source/NSTabView.m ([NSTabView -selectedTabViewItem]): Check
that the array count is > 0
2002-11-24 Adam Fedor <fedor@gnu.org>
* Tools/example.m: Include NSProcessInfo.h
2002-11-24 Fred Kiefer <FredKiefer@gmx.de>
* Headers/gnustep/gui/NSSavePanel.h

View file

@ -43,9 +43,7 @@ file has been placed on @samp{@value{GNUSTEP-GUI-FTP-MACHINE}} in
the TIFF Graphics library version
@value{GNUSTEP-GUI-LIBTIFF} is required.
It also requires a FoundationKit library as specified by the OpenStep
specification. The only FoundationKit library known to work is the GNUstep
Base Library.
It also requires the GNUstep Base Library.
@section Where do I send bug reports?

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];
}