diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/nsfont.m | 6 |
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 @@ | |||
| 1 | 2012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change) | ||
| 2 | |||
| 3 | * nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541). | ||
| 4 | |||
| 1 | 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2012-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]); |