summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 09166b17cfb..895bb2b32e8 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1459,7 +1459,16 @@ with SIGHUP. */)
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;