changeset 77176:421b3f5480da

(Fkill_buffer): gcpro BUF during kill_buffer_processes and check that buffer is still alive upon return.
author Kim F. Storm <storm@cua.dk>
date Fri, 13 Apr 2007 12:52:00 +0000
parents b8f03c38b27a
children 6507b26d615f
files src/buffer.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Fri Apr 13 12:51:48 2007 +0000
+++ b/src/buffer.c	Fri Apr 13 12:52:00 2007 +0000
@@ -1458,7 +1458,16 @@
   unlock_buffer (b);
 #endif /* CLASH_DETECTION */
 
+  GCPRO1 (buf);
   kill_buffer_processes (buf);
+  UNGCPRO;
+
+  /* Killing buffer processes may run sentinels which may
+     have called kill-buffer.  */
+
+  if (NILP (b->name))
+    return Qnil;
+
   clear_charpos_cache (b);
 
   tem = Vinhibit_quit;