From: handa Date: Tue, 20 Dec 2005 12:39:42 +0000 (+0000) Subject: (mchar_get_prop): Check char_prop_list. X-Git-Tag: REL-1-3-0~8 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bd6280792d9929b3f0a65a8ab80723f1eb240f8;p=m17n%2Fm17n-lib.git (mchar_get_prop): Check char_prop_list. (mchar_put_prop, mchar_get_prop_table): Likewise. --- diff --git a/src/character.c b/src/character.c index f872360..a9b3569 100644 --- a/src/character.c +++ b/src/character.c @@ -452,6 +452,8 @@ mchar_get_prop (int c, MSymbol key) { MCharPropRecord *record; + if (! char_prop_list) + return NULL; record = mplist_get (char_prop_list, key); if (! record) return NULL; @@ -497,6 +499,8 @@ mchar_put_prop (int c, MSymbol key, void *val) { MCharPropRecord *record; + if (! char_prop_list) + MERROR (MERROR_CHAR, -1); record = mplist_get (char_prop_list, key); if (! record) return -1; @@ -542,6 +546,8 @@ mchar_get_prop_table (MSymbol key, MSymbol *type) { MCharPropRecord *record; + if (! char_prop_list) + return NULL; record = mplist_get (char_prop_list, key); if (! record) return NULL;