use instance variable after setting it correctly

This commit is contained in:
rmottola 2020-09-08 20:51:23 +02:00
parent 334bfd1f37
commit 79125b35a8

View file

@ -149,19 +149,20 @@ enum {
if ((self = [super init]))
{
id <PCPreferences> prefs = [[project projectManager] prefController];
id <PCPreferences> prefs;
NSFont *font;
NSString *fontName;
CGFloat fontSize;
project = aProject;
prefs = [[project projectManager] prefController];
fontName = [prefs stringForKey:ConsoleFixedFont];
fontSize = [prefs floatForKey:ConsoleFixedFontSize];
font = [NSFont fontWithName:fontName size:fontSize];
if (font == nil)
font = [NSFont userFixedPitchFontOfSize:0];
project = aProject;
textAttributes =
[NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
[textAttributes retain];