From db9d7d9a54118c277fdc47b2840139e78218b1ae Mon Sep 17 00:00:00 2001 From: Karoly Lorentey Date: Wed, 8 Mar 2006 16:47:48 +0000 Subject: [PATCH] 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 --- README.multi-tty | 1 + src/frame.c | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.multi-tty b/README.multi-tty index da3ab4ade5b..c967d467168 100644 --- a/README.multi-tty +++ b/README.multi-tty @@ -47,6 +47,7 @@ Bas Kok Jurej Kubelka David Lichteblau mace +Suresh Madhu Xavier Mallard Istvan Marko Ted Morse diff --git a/src/frame.c b/src/frame.c index 5131f4959e1..ac7fc5912e8 100644 --- a/src/frame.c +++ b/src/frame.c @@ -766,9 +766,12 @@ affects all frames on the same terminal device. */) 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. */ -- 2.11.4.GIT