summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2006-03-08 16:47:48 +0000
committerKaroly Lorentey <lorentey@elte.hu>2006-03-08 16:47:48 +0000
commitdb9d7d9a54118c277fdc47b2840139e78218b1ae (patch)
tree93ebf1a41c223a35ae61d76b4c6f4b9c7ae7b4ae
parent4fd9de393a0c57766f0d0ac91c0abc2e2fa268f6 (diff)
downloademacs-db9d7d9a54118c277fdc47b2840139e78218b1ae.tar.gz
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
-rw-r--r--README.multi-tty1
-rw-r--r--src/frame.c9
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 <nekkobassu@yahoo.com>
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>
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. */