From 91a75c0d460efb7490c7901ff8572adb14cd50db Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 3 Apr 2025 16:44:10 +0800 Subject: [PATCH] ; Add a check for liveness to last change --- lisp/vc/vc-dispatcher.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 5416dac5313..9e238560710 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -205,8 +205,9 @@ Another is that undo information is not kept." ;; See bug#53626 and bug#77306. (setq default-directory olddir) (run-with-timer 0 nil (lambda () - (with-current-buffer buf - (setq default-directory olddir)))) + (when (buffer-live-p buf) + (with-current-buffer buf + (setq default-directory olddir))))) (let ((buffer-undo-list t) (inhibit-read-only t))