summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog5
-rw-r--r--src/nsfont.m5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 65d9ae916b9..90d9d1a8db8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/nsfont.m b/src/nsfont.m
index 7a456c4bb5d..7a44182a93e 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -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)
{