diff --git a/modules/input/gtkimcontextime.c b/modules/input/gtkimcontextime.c index 30c56c59cd..5bc65793e2 100644 --- a/modules/input/gtkimcontextime.c +++ b/modules/input/gtkimcontextime.c @@ -336,6 +336,9 @@ gtk_im_context_ime_filter_keypress (GtkIMContext *context, return FALSE; utf8 = g_utf16_to_utf8 (event_priv->translation, event_priv->translation_len, NULL, NULL, NULL); + if (!utf8) + return FALSE; + g_signal_emit_by_name (context_ime, "commit", utf8); g_free (utf8);