aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2012-11-08 20:51:07 +0100
committerJan Djärv2012-11-08 20:51:07 +0100
commit074d7bb094256a445101a851fb4cd94aeca4574b (patch)
tree1e974085f0e0315ec70d5f702e0ada27780af079 /src
parentd41706aa7a416c6bf0428eb9c897ad4253849480 (diff)
downloademacs-074d7bb094256a445101a851fb4cd94aeca4574b.tar.gz
emacs-074d7bb094256a445101a851fb4cd94aeca4574b.zip
nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/nsfont.m6
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 24f3305b870..a2f39db5a88 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change)
2
3 * nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
4
12012-11-08 Stefan Monnier <monnier@iro.umontreal.ca> 52012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 Use ad-hoc comparison function for the profiler's hash-tables. 7 Use ad-hoc comparison function for the profiler's hash-tables.
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)
559 if (isMatch) 559 if (isMatch)
560 [fkeys removeObject: NSFontFamilyAttribute]; 560 [fkeys removeObject: NSFontFamilyAttribute];
561 561
562 matchingDescs = [fdesc matchingFontDescriptorsWithMandatoryKeys: fkeys]; 562 if ([fkeys count] > 0)
563 matchingDescs = [fdesc matchingFontDescriptorsWithMandatoryKeys: fkeys];
564 else
565 matchingDescs = [NSMutableArray array];
566
563 if (NSFONT_TRACE) 567 if (NSFONT_TRACE)
564 NSLog(@"Got desc %@ and found %d matching fonts from it: ", fdesc, 568 NSLog(@"Got desc %@ and found %d matching fonts from it: ", fdesc,
565 [matchingDescs count]); 569 [matchingDescs count]);