diff --git a/xcb-debug.el b/xcb-debug.el index b72a46d..e99661d 100644 --- a/xcb-debug.el +++ b/xcb-debug.el @@ -77,8 +77,9 @@ Here are some predefined candidates: `(with-current-buffer (xcb-debug:-get-buffer) (let (windows-eob) ;; Note windows whose point is at EOB. - (dolist (w (get-buffer-window-list xcb-debug:buffer t 'nomini)) - (when (= (window-point w) (point-max)) + (dolist (w (get-buffer-window-list (current-buffer) t 'nomini)) + (when (and (window-live-p w) + (= (window-point w) (point-max))) (push w windows-eob))) (save-excursion (goto-char (point-max))