summaryrefslogtreecommitdiff
path: root/src/nsfont.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/nsfont.m')
-rw-r--r--src/nsfont.m6
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]);