changeset 83486:fc6efa09ea7a

Fix segfault by `C-x 5 2' on the controlling tty. (Reported by Suresh Madhu.) * src/frame.c (Fmake_terminal_frame): Handle NULL tty names correctly. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-526
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 08 Mar 2006 16:47:48 +0000
parents f4e40bc8606b
children 414faf8dce4e
files README.multi-tty src/frame.c
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/README.multi-tty	Wed Mar 08 15:11:03 2006 +0000
+++ b/README.multi-tty	Wed Mar 08 16:47:48 2006 +0000
@@ -47,6 +47,7 @@
 Jurej Kubelka <Juraj.Kubelka@email.cz>
 David Lichteblau <david@lichteblau.com>
 mace <mace@kirjakaapeli.lib.hel.fi>
+Suresh Madhu <madhu@cs.unm.edu>
 Xavier Mallard <zedek@gnu-rox.org>
 Istvan Marko <mi-mtty@kismala.com>
 Ted Morse <morse@ciholas.com>
--- a/src/frame.c	Wed Mar 08 15:11:03 2006 +0000
+++ b/src/frame.c	Wed Mar 08 16:47:48 2006 +0000
@@ -766,9 +766,12 @@
   Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty_type,
                                                  build_string (t->display_info.tty->type)),
                                           Qnil));
-  Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty,
-                                                 build_string (t->display_info.tty->name)),
-                                          Qnil));
+  if (t->display_info.tty->name != NULL)
+    Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty,
+                                                   build_string (t->display_info.tty->name)),
+                                            Qnil));
+  else
+    Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty, Qnil), Qnil));
   
   /* Make the frame face alist be frame-specific, so that each
      frame could change its face definitions independently.  */