]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: notmuch-start-notmuch-sentinel: assert buffer is alive
authorJonas Bernoulli <jonas@bernoul.li>
Sun, 10 Jan 2021 14:00:42 +0000 (15:00 +0100)
committerDavid Bremner <david@tethera.net>
Wed, 13 Jan 2021 11:06:16 +0000 (07:06 -0400)
emacs/notmuch-lib.el

index 21fa25824373ced9c69b0a81953dcc8790f5a0b1..06ca8cdcbc498391561c26f2730a16a1bea65674 100644 (file)
@@ -917,7 +917,8 @@ status."
 (defun notmuch-start-notmuch-sentinel (proc event)
   "Process sentinel function used by `notmuch-start-notmuch'."
   (let* ((err-buffer (process-get proc 'err-buffer))
-        (err (and (not (zerop (buffer-size err-buffer)))
+        (err (and (buffer-live-p err-buffer)
+                  (not (zerop (buffer-size err-buffer)))
                   (with-current-buffer err-buffer (buffer-string))))
         (sub-sentinel (process-get proc 'sub-sentinel))
         (real-command (process-get proc 'real-command)))