From: handa Date: Tue, 1 Jun 2004 01:21:10 +0000 (+0000) Subject: (mfontset_modify_entry): Pay attention to the case X-Git-Tag: withdl~132 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f0183c5730206e7dc5606d60596a150463c8da64;p=m17n%2Fm17n-lib.git (mfontset_modify_entry): Pay attention to the case that fontset->font_spec_list is NULL. --- diff --git a/src/fontset.c b/src/fontset.c index d42a44e..f525d68 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -837,14 +837,17 @@ mfontset_modify_entry (MFontset *fontset, if (fontset->mdb) load_fontset_contents (fontset); - MPLIST_DO (pl, fontset->font_spec_list) - { - if (! memcmp (MPLIST_VAL (pl), spec, sizeof (MFont))) - { - font = MPLIST_VAL (pl); - break; - } - } + if (! fontset->font_spec_list) + fontset->font_spec_list = mplist (); + else + MPLIST_DO (pl, fontset->font_spec_list) + { + if (! memcmp (MPLIST_VAL (pl), spec, sizeof (MFont))) + { + font = MPLIST_VAL (pl); + break; + } + } if (! font) { font = mfont ();