From: Kim F. Storm Date: Fri, 13 Apr 2007 12:52:00 +0000 (+0000) Subject: (Fkill_buffer): gcpro BUF during kill_buffer_processes X-Git-Tag: emacs-pretest-22.0.98~96 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=49da74e69827880a3091fd68c55b7bb3a6326dfa;p=emacs.git (Fkill_buffer): gcpro BUF during kill_buffer_processes and check that buffer is still alive upon return. --- diff --git a/src/buffer.c b/src/buffer.c index 3ad92331e01..ba23cc6ae33 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1458,7 +1458,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;