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
This commit is contained in:
Paul Eggert 2014-06-09 07:50:57 -07:00
parent fd60bf6c90
commit f4454d5215
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
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 <rgm@gnu.org>
* fileio.c (write-region-inhibit-fsync): Doc tweak.

View file

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