Skip to content

Commit 89a4488

Browse files
muffinmadEli-Zaretskii
authored andcommitted
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)
1 parent 1161c7d commit 89a4488

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lisp/progmodes/python.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3832,10 +3832,10 @@ Returns the tracked buffer."
38323832

38333833
(defun python-pdbtrack-unset-tracked-buffer ()
38343834
"Untrack currently tracked buffer."
3835-
(when python-pdbtrack-tracked-buffer
3835+
(when (buffer-live-p python-pdbtrack-tracked-buffer)
38363836
(with-current-buffer python-pdbtrack-tracked-buffer
3837-
(set-marker overlay-arrow-position nil))
3838-
(setq python-pdbtrack-tracked-buffer nil)))
3837+
(set-marker overlay-arrow-position nil)))
3838+
(setq python-pdbtrack-tracked-buffer nil))
38393839

38403840
(defun python-pdbtrack-tracking-finish ()
38413841
"Finish tracking."

0 commit comments

Comments
 (0)