]> git.eshelyaron.com Git - emacs.git/commitdiff
* nsfont.m (ns_charset_covers): Don't abort if no bitmap.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 13 Jul 2012 01:37:11 +0000 (18:37 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 13 Jul 2012 01:37:11 +0000 (18:37 -0700)
Fixes: debbugs:11853
src/ChangeLog
src/nsfont.m

index 65d9ae916b90c2317a04a027daa7532de47a2218..90d9d1a8db8ba9c58eb54f0b27d3d07ea401b4a7 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
+       Report and trivial fix by BT Templeton.
+
 2012-07-13  Glenn Morris  <rgm@gnu.org>
 
        * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
index 7a456c4bb5daa7cfc8a03f595d4571e7df32e996..7a44182a93eac96ed313782f3d249cb7e9ac6457 100644 (file)
@@ -271,6 +271,11 @@ ns_charset_covers(NSCharacterSet *set1, NSCharacterSet *set2, float pct)
     const unsigned short *bytes2 = [[set2 bitmapRepresentation] bytes];
     int i, off = 0, tot = 0;
 
+    /* Work around what appears to be a GNUstep bug.
+       See <http://bugs.gnu.org/11853>.  */
+    if (! (bytes1 && bytes2))
+      return NO;
+
     for (i=0; i<4096; i++, bytes1++, bytes2++)
        if (*bytes2)
          {