mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 21:07:39 +00:00
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:
parent
12f532ae25
commit
e7394a8320
3 changed files with 11 additions and 4 deletions
|
@ -159,7 +159,7 @@
|
|||
|
||||
- (NSTabViewItem*) selectedTabViewItem
|
||||
{
|
||||
if (_selected_item == NSNotFound)
|
||||
if (_selected_item == NSNotFound || [_items count] == 0)
|
||||
return nil;
|
||||
return [_items objectAtIndex: _selected_item];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue