Tolerate null pointer arguments for returning information.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20063 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2004-09-14 03:34:37 +00:00
parent eecc49af68
commit d427f1afd3
4 changed files with 36 additions and 16 deletions

View file

@ -90,11 +90,17 @@
}
if (d == nil)
{
*error = @"Couldn't convert to date";
if (error)
{
*error = @"Couldn't convert to date";
}
return NO;
}
}
*anObject = d;
if (anObject)
{
*anObject = d;
}
return YES;
}
@ -116,8 +122,14 @@
newEditingString: (NSString**)newString
errorDescription: (NSString**)error
{
*newString = nil;
*error = nil;
if (newString)
{
*newString = nil;
}
if (error)
{
*error = nil;
}
return YES;
}