From e4829ab95d1a0d3764b6c4e860877a1b0c17c670 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 15 Mar 2011 19:08:44 +0100 Subject: [PATCH] Protect against trying to restore window configurations containing buffers that are now dead. --- lisp/ChangeLog | 3 +++ lisp/gnus-win.el | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c83ac3387..398086dd4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-03-15 Lars Magne Ingebrigtsen + * gnus-win.el (gnus-configure-frame): Protect against trying to restore + window configurations containing buffers that are now dead. + * nnimap.el (nnimap-parse-flags): Remove all MODSEQ entries before parsing to avoid integer overflows. (nnimap-parse-flags): Simplify the last change. diff --git a/lisp/gnus-win.el b/lisp/gnus-win.el index 156f9a020..c38f57d96 100644 --- a/lisp/gnus-win.el +++ b/lisp/gnus-win.el @@ -268,8 +268,10 @@ See the Gnus manual for an explanation of the syntax used.") (error "Invalid buffer type: %s" type)) (let ((buf (gnus-get-buffer-create (gnus-window-to-buffer-helper buffer)))) - (if (eq buf (window-buffer (selected-window))) (set-buffer buf) - (switch-to-buffer buf))) + (when (buffer-name buf) + (if (eq buf (window-buffer (selected-window))) + (set-buffer buf) + (switch-to-buffer buf)))) (when (memq 'frame-focus split) (setq gnus-window-frame-focus window)) ;; We return the window if it has the `point' spec. -- 2.25.1