From 6fa2c7e3b7228a4f772d907e11429099b3ddc9f5 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 1 Mar 2018 16:44:02 +0700 Subject: [PATCH] xim: Use NULL-safe string comparison The locale string may be NULL. --- gtk/gtkimcontextxim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkimcontextxim.c b/gtk/gtkimcontextxim.c index c258df65c2..15e3cce131 100644 --- a/gtk/gtkimcontextxim.c +++ b/gtk/gtkimcontextxim.c @@ -409,7 +409,7 @@ get_im (GdkWindow *client_window, { GtkXIMInfo *tmp_info = tmp_list->data; if (tmp_info->display == display && - strcmp (tmp_info->locale, locale) == 0) + g_strcmp0 (tmp_info->locale, locale) == 0) { if (tmp_info->im) {