]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix core dump after a dropped X connection.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 9 Jun 2014 14:50:57 +0000 (07:50 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 9 Jun 2014 14:50:57 +0000 (07:50 -0700)
* sysdep.c (stuff_char): Don't abort merely because the selected frame
is dead, as we may be shutting down.

Fixes: debbugs:17704
src/ChangeLog
src/sysdep.c

index 6f864f5eef5b69ea523632560fc87d55b80f8221..9c6596c306ac0b80da42fd7f2aa36d388b0fb5bc 100644 (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.
index 2eedd1fc6cb57e3f7b689bfcffc8987275b41bee..211a3bb706f07c7cfa38280b22f272ba62317243 100644 (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 */