mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +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
df6440235d
commit
7c98affe14
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…
Reference in a new issue