Commit 88dc7842 authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

modules: Check current context before retrieving surrounding

There may be situations where this might get called while the
currently focused context just went away (eg. after setting the
text widget unsensitive).

Closes: #1317
parent 2e9439b0
...@@ -121,6 +121,9 @@ notify_external_change (GtkIMContextWayland *context) ...@@ -121,6 +121,9 @@ notify_external_change (GtkIMContextWayland *context)
{ {
gboolean result; gboolean result;
if (!global->current)
return;
context->surrounding_change = ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_OTHER; context->surrounding_change = ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_OTHER;
g_signal_emit_by_name (global->current, "retrieve-surrounding", &result); g_signal_emit_by_name (global->current, "retrieve-surrounding", &result);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment