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

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