check for nil argument and raise as per apple documentation

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35193 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2012-06-12 05:39:31 +00:00
parent ff4697151d
commit 7bef14a326
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2012-06-12 Richard Frith-Macdonald <rfm@gnu.org>
* NSPropertyList.m: Check for nil property list argument.
2012-06-07 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/unix/GSRunLoopCtxt.m (-pollUntil:within:): Fix previous

View file

@ -2376,6 +2376,13 @@ static BOOL classInitialized = NO;
NSDictionary *loc;
int step = 2;
if (nil == aPropertyList)
{
[NSException raise: NSInvalidArgumentException
format: @"[%@ +%@]: nil property list",
NSStringFromClass(self), NSStringFromSelector(_cmd)];
}
loc = [[NSUserDefaults standardUserDefaults] dictionaryRepresentation];
dest = [NSMutableData dataWithCapacity: 1024];