From ecaffc4426944e2034a56a574f0b809f903eddc7 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 30 Sep 2010 11:10:03 +0000 Subject: [PATCH] (open_im): Return -1 if the input method has no state. --- src/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 1.7.10.4