mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 07:04:29 +00:00
IME IM: Be able to handle NULL widget correctly
This commit is contained in:
parent
138104de27
commit
83f952d771
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user