xim: Use NULL-safe string comparison

The locale string may be NULL.
This commit is contained in:
Emmanuele Bassi 2018-03-01 16:44:02 +07:00
parent 32873cc94b
commit 6fa2c7e3b7

View File

@ -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)
{