Release all memory if the fontInfo can't be created.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16386 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2003-04-07 11:07:57 +00:00
parent e021f7500a
commit c0587cf573
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2003-04-07 13:05 Alexander Malmberg <alexander@malmberg.org>
* Source/NSFont.m (-initWithName:matrix:fix:screenFont:): Release
all memory if the fontInfo can't be created.
2003-04-07 11:56 Alexander Malmberg <alexander@malmberg.org>
* TextConverters/RTF/rtfGrammer.y: Add error recovery rules.

View file

@ -653,7 +653,9 @@ setNSFont(NSString* key, NSFont* font)
screenFont: screen]);
if (fontInfo == nil)
{
RELEASE (self);
DESTROY(fontName);
DESTROY(nameWithMatrix);
RELEASE(self);
return nil;
}