mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Fix error in caching.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14589 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a5b46e92b7
commit
f73feaf4e9
1 changed files with 4 additions and 4 deletions
|
@ -489,16 +489,16 @@ setNSFont(NSString* key, NSFont* font)
|
|||
fontMatrix[3], fontMatrix[4], fontMatrix[5]];
|
||||
|
||||
/* Check whether the font is cached */
|
||||
font = (id)NSMapGet(globalFontMap, (void*)nameWithMatrix);
|
||||
font = RETAIN((id)NSMapGet(globalFontMap, (void*)nameWithMatrix));
|
||||
if (font == nil)
|
||||
{
|
||||
font = AUTORELEASE([[NSFontClass alloc] initWithName: aFontName
|
||||
matrix: fontMatrix]);
|
||||
font = [[NSFontClass alloc] initWithName: aFontName
|
||||
matrix: fontMatrix];
|
||||
/* Cache the font for later use */
|
||||
NSMapInsert(globalFontMap, (void*)nameWithMatrix, (void*)font);
|
||||
}
|
||||
|
||||
return font;
|
||||
return AUTORELEASE(font);
|
||||
}
|
||||
|
||||
/** Creates a new font with name aFontName and size fontSize. Fonts created
|
||||
|
|
Loading…
Reference in a new issue