From: Po Lu Date: Wed, 18 May 2022 01:07:41 +0000 (+0800) Subject: Fix a crash when an X connection is dropped in some situations X-Git-Tag: emacs-29.0.90~1910^2~611 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8b98f87b924fcb2e79740063b36db1ed0b752853;p=emacs.git Fix a crash when an X connection is dropped in some situations * src/xterm.c (x_flip_and_flush): Don't try to flush if `inhibit-redisplay' is t. --- diff --git a/src/xterm.c b/src/xterm.c index f81d99ca129..c24de0f185f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5618,6 +5618,12 @@ show_back_buffer (struct frame *f) static void x_flip_and_flush (struct frame *f) { + /* Flipping buffers requires a working connection to the X server, + which isn't always present if `inhibit-redisplay' is t, since + this can be called from the IO error handler. */ + if (!NILP (Vinhibit_redisplay)) + return; + block_input (); #ifdef HAVE_XDBE if (FRAME_X_NEED_BUFFER_FLIP (f))