Skip to content

Commit

Permalink
bus: Fix a SEGV in bus_input_context_emit_signal
Browse files Browse the repository at this point in the history
IBus engines can call 'RequireSurroundingText' for a fake input context
if there is no input focus.
  • Loading branch information
fujiwarat committed May 23, 2018
1 parent 196216a commit 8ab0b60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bus/inputcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,9 @@ bus_input_context_emit_signal (BusInputContext *context,
GError **error)
{
if (context->connection == NULL) {
g_variant_unref (parameters);
/* fake context has no connections. */
if (parameters)
g_variant_unref (parameters);
return TRUE;
}

Expand Down

0 comments on commit 8ab0b60

Please sign in to comment.