[PATCH v2 05/36] emacs: notmuch-start-notmuch-error-sentinel: assert buffer is alive

Subject: [PATCH v2 05/36] emacs: notmuch-start-notmuch-error-sentinel: assert buffer is alive

Date: Sun, 10 Jan 2021 15:00:41 +0100

To: notmuch@notmuchmail.org

Cc:

From: Jonas Bernoulli


---
 emacs/notmuch-lib.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 76387779..21fa2582 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -956,7 +956,8 @@ (defun notmuch-start-notmuch-sentinel (proc event)
 
 (defun notmuch-start-notmuch-error-sentinel (proc event)
   (let ((buffer (process-get proc 'err-buffer)))
-    (kill-buffer buffer)))
+    (when (buffer-live-p buffer)
+      (kill-buffer buffer))))
 
 (defvar-local notmuch-show-process-crypto nil)
 
-- 
2.29.1
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: