* sysdep.c (stuff_char): Don't abort merely because the selected frame
is dead, as we may be shutting down.
Fixes: debbugs:17704
+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.
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 */