From 3bd6280792d9929b3f0a65a8ab80723f1eb240f8 Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 20 Dec 2005 12:39:42 +0000 Subject: [PATCH] (mchar_get_prop): Check char_prop_list. (mchar_put_prop, mchar_get_prop_table): Likewise. --- src/character.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 1.7.10.4