]> git.eshelyaron.com Git - emacs.git/commitdiff
(CHAR_CHARSET_P): Check if the encoder is loaded or
authorKenichi Handa <handa@m17n.org>
Sat, 29 Nov 2008 13:47:31 +0000 (13:47 +0000)
committerKenichi Handa <handa@m17n.org>
Sat, 29 Nov 2008 13:47:31 +0000 (13:47 +0000)
not before accessing it.

src/ChangeLog
src/charset.h

index e0575f03d7622ea148a151e379466439aa242132..1cb44419d1f56e38799071565c3385cb644c8916 100644 (file)
@@ -1,5 +1,8 @@
 2008-11-29  Kenichi Handa  <handa@m17n.org>
 
+       * charset.h (CHAR_CHARSET_P): Check if the encoder is loaded or
+       not before accessing it.
+
        * charset.c (Fdefine_charset_internal): After calculating
        min_char, max_char, and fastmap, copy the charset structure again.
        (encode_char): Fix the previous change.
index 1dac7add2424af89bab5fac9984dcec053077ad4..fa3f363a9e893eec41cd69b2958d16f7a5a20129 100644 (file)
@@ -503,7 +503,8 @@ extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL];
          && ((charset)->method == CHARSET_METHOD_OFFSET                 \
              ? (c) >= (charset)->min_char && (c) <= (charset)->max_char \
              : ((charset)->method == CHARSET_METHOD_MAP                 \
-                && (charset)->compact_codes_p)                          \
+                && (charset)->compact_codes_p                           \
+                && CHAR_TABLE_P (CHARSET_ENCODER (charset)))            \
              ? ! NILP (CHAR_TABLE_REF (CHARSET_ENCODER (charset), (c))) \
              : encode_char ((charset), (c)) != (charset)->invalid_code))))