1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-22 16:01:04 -08:00

nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).

This commit is contained in:
Jan Djärv 2012-11-08 20:51:07 +01:00
parent d41706aa7a
commit 074d7bb094
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change)
* nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
Use ad-hoc comparison function for the profiler's hash-tables.

View file

@ -559,7 +559,11 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch)
if (isMatch)
[fkeys removeObject: NSFontFamilyAttribute];
matchingDescs = [fdesc matchingFontDescriptorsWithMandatoryKeys: fkeys];
if ([fkeys count] > 0)
matchingDescs = [fdesc matchingFontDescriptorsWithMandatoryKeys: fkeys];
else
matchingDescs = [NSMutableArray array];
if (NSFONT_TRACE)
NSLog(@"Got desc %@ and found %d matching fonts from it: ", fdesc,
[matchingDescs count]);