Minor crash avoidance

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15931 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2003-02-11 09:13:24 +00:00
parent 3767272175
commit 0f92295f75
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2003-02-11 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSFileManager.m: ([+attributesAt:traverseLink:]) check for
null pointer and return nil. Crash reported by Tom Koelman.
2003-02-10 13:56 Alexander Malmberg <alexander@malmberg.org>
* Source/NSRunLoop.m [HAVE_POLL] (-pollUntil:within:): Set fdEnd

View file

@ -2573,6 +2573,10 @@ static NSSet *fileKeys = nil;
{
GSAttrDictionary *d;
if (cpath == 0 || *cpath == '\0')
{
return nil;
}
d = (GSAttrDictionary*)NSAllocateObject(self, 0, NSDefaultMallocZone());
#ifdef __MINGW__
d->name = NSZoneMalloc(NSDefaultMallocZone(), strlen(cpath)+1);