Add missing retain in keyed decoding case.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25804 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2007-12-30 15:03:06 +00:00
parent 8557f009df
commit 87e0d03c60
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2007-12-30 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSFont.m (-initWithCoder:): Add missing RETAIN.
2007-12-25 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSMenu.h:

View file

@ -1284,7 +1284,7 @@ static BOOL flip_hack;
NSString *name = [aDecoder decodeObjectForKey: @"NSName"];
float size = [aDecoder decodeFloatForKey: @"NSSize"];
RELEASE(self);
DESTROY(self);
if ([aDecoder containsValueForKey: @"NSfFlags"])
{
int flags = [aDecoder decodeIntForKey: @"NSfFlags"];
@ -1303,7 +1303,7 @@ static BOOL flip_hack;
}
}
self = [NSFont fontWithName: name size: size];
self = RETAIN([NSFont fontWithName: name size: size]);
if (self == nil)
{
self = RETAIN([NSFont systemFontOfSize: size]);