From: Andrii Kolomoiets Date: Thu, 28 Nov 2019 13:54:41 +0000 (+0200) Subject: Ensure buffer is alive in python-pdbtrack-unset-tracked-buffer X-Git-Tag: emacs-27.0.90~417 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=89a4488f8950c52b6e3fd8b780761ede87b518fd;p=emacs.git Ensure buffer is alive in python-pdbtrack-unset-tracked-buffer * lisp/progmodes/python.el (python-pdbtrack-unset-tracked-buffer): Check if buffer `python-pdbtrack-tracked-buffer' is alive. (Bug#38413) --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index e720c6eb6a8..1b3b92deaf5 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -3832,10 +3832,10 @@ Returns the tracked buffer." (defun python-pdbtrack-unset-tracked-buffer () "Untrack currently tracked buffer." - (when python-pdbtrack-tracked-buffer + (when (buffer-live-p python-pdbtrack-tracked-buffer) (with-current-buffer python-pdbtrack-tracked-buffer - (set-marker overlay-arrow-position nil)) - (setq python-pdbtrack-tracked-buffer nil))) + (set-marker overlay-arrow-position nil))) + (setq python-pdbtrack-tracked-buffer nil)) (defun python-pdbtrack-tracking-finish () "Finish tracking."