* src/xgselect.c (xg_select): Don't call Glib functions that use
'context' if we failed to acquire it. This means some other
thread owns the context, in which case both using the context and
calling block_input/unblock_input will step on that thread's toes
and eventually lead to crashes. (Bug#25172)
#else
need_to_dispatch = true;
#endif
- if (need_to_dispatch)
+ if (need_to_dispatch && context_acquired)
{
int pselect_errno = errno;
/* Prevent g_main_dispatch recursion, that would occur without