From: handa Date: Thu, 30 Sep 2010 11:10:03 +0000 (+0000) Subject: (open_im): Return -1 if the input method has no state. X-Git-Tag: REL-1-6-2~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ecaffc4426944e2034a56a574f0b809f903eddc7;p=m17n%2Fm17n-lib.git (open_im): Return -1 if the input method has no state. --- diff --git a/src/input.c b/src/input.c index 61baa7a..a4f6fe3 100644 --- a/src/input.c +++ b/src/input.c @@ -3795,7 +3795,7 @@ open_im (MInputMethod *im) { MInputMethodInfo *im_info = get_im_info (im->language, im->name, Mnil, Mnil); - if (! im_info || ! im_info->states) + if (! im_info || ! im_info->states || MPLIST_LENGTH (im_info->states) == 0) MERROR (MERROR_IM, -1); im->info = im_info;