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 */