mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
([NSArray +arrayWithObject:]): Correctly raise exception on nil argument.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@629 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c9fc2fb84b
commit
c451add3c4
1 changed files with 2 additions and 0 deletions
|
@ -127,6 +127,8 @@ static Class NSMutableArray_concrete_class;
|
|||
|
||||
+ arrayWithObject: anObject
|
||||
{
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"Tried to add nil"];
|
||||
return [[[[self _concreteClass] alloc] initWithObjects:&anObject count:1]
|
||||
autorelease];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue