diff options
| author | Jan Djärv | 2013-05-14 11:34:16 +0200 |
|---|---|---|
| committer | Jan Djärv | 2013-05-14 11:34:16 +0200 |
| commit | 8fdeaad563abf86083da6e50e2619291b7d1e455 (patch) | |
| tree | 8ad7722eeb2dc43fcc1073b6731d0b647805c304 /src | |
| parent | 469bfed936a2477c49c24325734a9e8af926bc9f (diff) | |
| download | emacs-8fdeaad563abf86083da6e50e2619291b7d1e455.tar.gz emacs-8fdeaad563abf86083da6e50e2619291b7d1e455.zip | |
* nsfont.m (ns_spec_to_descriptor): Retain and autorelease fdesc.
Fixes: debbugs:14375
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/nsfont.m | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 836f6d4b7b8..db766c78e6c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-05-14 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * nsfont.m (ns_spec_to_descriptor): Retain and autorelease | ||
| 4 | fdesc (Bug#14375). | ||
| 5 | |||
| 1 | 2013-05-12 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2013-05-12 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | * image.c (gif_load): Check that subimages fit (Bug#14345). | 8 | * image.c (gif_load): Check that subimages fit (Bug#14345). |
diff --git a/src/nsfont.m b/src/nsfont.m index ebee363651f..9ab369d1fcd 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -151,10 +151,13 @@ ns_spec_to_descriptor (Lisp_Object font_spec) | |||
| 151 | if ([tdict count] > 0) | 151 | if ([tdict count] > 0) |
| 152 | [fdAttrs setObject: tdict forKey: NSFontTraitsAttribute]; | 152 | [fdAttrs setObject: tdict forKey: NSFontTraitsAttribute]; |
| 153 | 153 | ||
| 154 | fdesc = [NSFontDescriptor fontDescriptorWithFontAttributes: fdAttrs]; | 154 | fdesc = [[[NSFontDescriptor fontDescriptorWithFontAttributes: fdAttrs] |
| 155 | retain] autorelease]; | ||
| 156 | |||
| 155 | if (family != nil) | 157 | if (family != nil) |
| 156 | { | 158 | { |
| 157 | fdesc = [fdesc fontDescriptorWithFamily: family]; | 159 | NSFontDescriptor *fdesc2 = [fdesc fontDescriptorWithFamily: family]; |
| 160 | fdesc = [[fdesc2 retain] autorelease]; | ||
| 158 | } | 161 | } |
| 159 | 162 | ||
| 160 | [fdAttrs release]; | 163 | [fdAttrs release]; |