From: Paul Eggert Date: Mon, 9 Jun 2014 14:50:57 +0000 (-0700) Subject: Fix core dump after a dropped X connection. X-Git-Tag: emacs-25.0.90~2639^2~89 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f4454d5215837bdddec70d8a1e7a9a4b3e4d52bd;p=emacs.git Fix core dump after a dropped X connection. * sysdep.c (stuff_char): Don't abort merely because the selected frame is dead, as we may be shutting down. Fixes: debbugs:17704 --- diff --git a/src/ChangeLog b/src/ChangeLog index 6f864f5eef5..9c6596c306a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-06-09 Paul Eggert + + Fix core dump after a dropped X connection (Bug#17704). + * sysdep.c (stuff_char): Don't abort merely because the selected frame + is dead, as we may be shutting down. + 2014-06-08 Glenn Morris * fileio.c (write-region-inhibit-fsync): Doc tweak. diff --git a/src/sysdep.c b/src/sysdep.c index 2eedd1fc6cb..211a3bb706f 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -222,7 +222,9 @@ discard_tty_input (void) void stuff_char (char c) { - if (! FRAME_TERMCAP_P (SELECTED_FRAME ())) + if (! (FRAMEP (selected_frame) + && FRAME_LIVE_P (XFRAME (selected_frame)) + && FRAME_TERMCAP_P (XFRAME (selected_frame)))) return; /* Should perhaps error if in batch mode */