diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2012-11-08 20:51:07 +0100 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2012-11-08 20:51:07 +0100 |
commit | 074d7bb094256a445101a851fb4cd94aeca4574b (patch) | |
tree | 1e974085f0e0315ec70d5f702e0ada27780af079 /src/nsfont.m | |
parent | d41706aa7a416c6bf0428eb9c897ad4253849480 (diff) | |
download | emacs-074d7bb094256a445101a851fb4cd94aeca4574b.tar.gz |
nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
Diffstat (limited to 'src/nsfont.m')
-rw-r--r-- | src/nsfont.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nsfont.m b/src/nsfont.m index 4f29d1d54a9..d2e5108bb7f 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -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]); |