IME IM: Be able to handle NULL widget correctly

This commit is contained in:
Руслан Ижбулатов 2019-05-21 21:29:38 +00:00 committed by Matthias Clasen
parent 138104de27
commit 83f952d771

View File

@ -255,7 +255,10 @@ gtk_im_context_ime_set_client_widget (GtkIMContext *context,
g_return_if_fail (GTK_IS_IM_CONTEXT_IME (context));
context_ime = GTK_IM_CONTEXT_IME (context);
client_surface = gtk_native_get_surface (gtk_widget_get_native (widget));
client_surface = NULL;
if (widget)
client_surface = gtk_native_get_surface (gtk_widget_get_native (widget));
if (client_surface)
{