Fix keyed decoding for GSMutableArray and GSPlaceholderArray.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33026 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2011-05-12 08:24:15 +00:00
parent df0421b216
commit 995276efc8
2 changed files with 14 additions and 7 deletions

View file

@ -535,10 +535,7 @@ static Class GSInlineArrayClass;
{
if ([aCoder allowsKeyedCoding])
{
NSArray *array = [(NSKeyedUnarchiver*)aCoder _decodeArrayOfObjectsForKey:
@"NS.objects"];
[self initWithArray: array];
self = [super initWithCoder: aCoder];
}
else
{
@ -1123,9 +1120,15 @@ static Class GSInlineArrayClass;
if ([aCoder allowsKeyedCoding])
{
NSArray *array = [(NSKeyedUnarchiver*)aCoder _decodeArrayOfObjectsForKey:
@"NS.objects"];
return RETAIN(array);
@"NS.objects"];
if (array != nil)
{
return RETAIN(array);
}
else
{
return [super initWithCoder: aCoder];
}
}
else
{