fixed: fontpanel was crashing

This commit is contained in:
daboe01 committed 2026-01-27 20:03:05 +01:00
1 parent 94195237d9
commit a5e9d65852
2 files changed
+4

No files matched your search

+3
View File
@@ -197,6 +197,9 @@ var _availableTraits= [@"Normal", @"Italic", @"Bold", @"Bold Italic"],
if (![self isVisible])
return;
if (![textView respondsToSelector:@selector(_attributesForFontPanel)])
return;
var attribs = [textView _attributesForFontPanel],
font = [attribs objectForKey:CPFontAttributeName] || [[textView textStorage] font] || [CPFont systemFontOfSize:12.0],
color = [attribs objectForKey:CPForegroundColorAttributeName];