diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2006-05-20 12:20:41 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2006-05-20 12:20:41 +0000 |
commit | a98f16179037d21357c817701c5181ac37fec0a2 (patch) | |
tree | 6057eb2ba02d9f55d2be2d61f4bb04956e0fb3f0 /src/terminal.c | |
parent | 4a6657585e59c464789c2039241b0c3a74d16199 (diff) | |
download | emacs-a98f16179037d21357c817701c5181ac37fec0a2.tar.gz |
Fix crashes in `delete-terminal' caused by recursive calls or X displays with live frames.
* src/termhooks.h (terminal) <deleted>: New member.
* src/term.c (delete_tty): Use it.
(deleting_tty): Remove old variable.
* src/terminal.c (delete_terminal): Use terminal->deleted.
* src/xterm.c (x_delete_terminal): Use terminal->deleted. Delete all
frames on the display explicitly.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-562
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/terminal.c b/src/terminal.c index fa6a0a4f51e..db75e16b6cf 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -277,7 +277,13 @@ delete_terminal (struct terminal *terminal) { struct terminal **tp; Lisp_Object tail, frame; - + + /* Protect against recursive calls. Fdelete_frame calls us back + when we delete our last frame. */ + if (terminal->deleted) + return; + terminal->deleted = 1; + /* Check for and close live frames that are still on this terminal. */ FOR_EACH_FRAME (tail, frame) |