Protect against trying to restore window configurations containing buffers that are...
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 15 Mar 2011 18:08:44 +0000 (19:08 +0100)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 15 Mar 2011 18:08:44 +0000 (19:08 +0100)
lisp/ChangeLog
lisp/gnus-win.el

index c83ac33..398086d 100644 (file)
@@ -1,5 +1,8 @@
 2011-03-15  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * 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.
index 156f9a0..c38f57d 100644 (file)
@@ -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.