Make sure resourceData returns autoreleased copy.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24373 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2007-01-17 08:19:49 +00:00
parent add02d8633
commit b2e8aa5583
2 changed files with 18 additions and 14 deletions

View file

@ -1,3 +1,8 @@
2007-01-17 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSURLHandle.m: ([resourceData]) make sure value returned
is autoreleased.
2007-01-16 Nicola Pero <nicola.pero@meta-innovation.com>
* configure.ac: Fixed url of build guide given in error message

View file

@ -526,11 +526,9 @@ static Class NSURLHandleClass = 0;
*/
- (NSData*) resourceData
{
if (_status == NSURLHandleLoadSucceeded)
if (_status != NSURLHandleLoadSucceeded)
{
return [self availableResourceData];
}
else if (_status == NSURLHandleLoadInProgress)
if (_status == NSURLHandleLoadInProgress)
{
return nil;
}
@ -542,9 +540,10 @@ static Class NSURLHandleClass = 0;
{
ASSIGNCOPY(_data, d);
}
return _data;
}
}
return [self availableResourceData];
}
/**
* Returns the current status of the handle.