Fix segfault when starting ibus.
authorHuang Peng <shawn.p.huang@gmail.com>
Thu, 21 Aug 2008 03:13:04 +0000 (11:13 +0800)
committerHuang Peng <shawn.p.huang@gmail.com>
Thu, 21 Aug 2008 03:13:04 +0000 (11:13 +0800)
client/gtk2/ibusimcontext.c

index e6787f1..3bc1bef 100644 (file)
@@ -438,6 +438,8 @@ _client_connected_cb (IBusIMClient *client, gpointer user_data)
         context = g_array_index (_im_context_array, IBusIMContext *, i);
         ic = ibus_im_client_create_input_context (client);
         ibus_im_context_set_ic (context, ic);
+        if (ic == NULL)
+            continue;
         g_hash_table_insert (_ic_table,
             (gpointer) ibus_im_context_get_ic (context), (gpointer) context);
     }