From: handa Date: Sat, 29 Oct 2005 03:16:34 +0000 (+0000) Subject: (get_candidate_list): Fix the timing of refering plist. X-Git-Tag: REL-1-3-0~107 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0dea047cb7ff15ea5d26e42e0cd55c513a56afbb;p=m17n%2Fm17n-lib.git (get_candidate_list): Fix the timing of refering plist. --- diff --git a/src/input.c b/src/input.c index 541b5bc..a987339 100644 --- a/src/input.c +++ b/src/input.c @@ -1584,9 +1584,13 @@ get_candidate_list (MInputContextInfo *ic_info, MPlist *args) column = MPLIST_INTEGER (plist); plist = MPLIST_PLIST (args); - if (charset - && (! (plist = adjust_candidates (plist, charset)))) - return NULL; + if (charset) + { + if (! (plist = adjust_candidates (plist, charset))) + return NULL; + } + else + M17N_OBJECT_REF (plist); if (column > 0) { @@ -1668,8 +1672,6 @@ get_candidate_list (MInputContextInfo *ic_info, MPlist *args) } } - if (plist == MPLIST_PLIST (args)) - M17N_OBJECT_REF (plist); return plist; }