diff src/frame.c @ 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 6319046b5d4c
children f271076dab2d
line wrap: on
line diff
--- 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.  */