Subject: Re: bug#11541: 24.0.97; Crash when visiting file on OS X 10.7.3

From: Chong Yidong <[email-masked]>
Date: Thu, 31 May 2012 14:52:12 +0800

Florian Ebeling <[email-masked]> writes:

> It still stops at the same location, which is 531 after the patch.
>
> 524	    if (!FONT_SPEC_P (font_spec))
> 525	      abort ();
> 526	
> 527 fkeys = [NSMutableSet setWithArray: [[fdesc fontAttributes]
> allKeys]];
> 528	    if (isMatch)
> 529		[fkeys removeObject: NSFontFamilyAttribute];
> 530	
> 531 matchingDescs = [fdesc matchingFontDescriptorsWithMandatoryKeys:
> fkeys];
> (gdb) p font_spec
> $1 = 140734799760960
> (gdb) xtype
> Lisp_Int0

Does the following patch fix the crash?

=== modified file 'src/nsfont.m'
*** src/nsfont.m	2012-02-10 18:58:48 +0000
--- src/nsfont.m	2012-05-31 06:51:00 +0000
***************
*** 157,164 ****
  	fdesc = [fdesc fontDescriptorWithFamily: family];
        }
  
-     [fdAttrs release];
-     [tdict release];
      return fdesc;
  }
  
--- 157,162 ----