* mail/rmail.el (rmail-mail-return): Only switch to live buffers.
authorChong Yidong <cyd@gnu.org>
Sat, 28 Jan 2012 02:01:05 +0000 (10:01 +0800)
committerChong Yidong <cyd@gnu.org>
Sat, 28 Jan 2012 02:01:05 +0000 (10:01 +0800)
lisp/mail/rmail.el

index 813912f..7d4c7c1 100644 (file)
@@ -3620,7 +3620,7 @@ to switch to."
       (cond ((null rmail-flag)
             ;; If the Rmail buffer is not in the next window, switch
             ;; directly to the Rmail buffer specified by NEWBUF.
-            (if newbuf
+            (if (buffer-live-p newbuf)
                 (switch-to-buffer newbuf)))
            ;; If the Rmail buffer is in the next window, switch to
            ;; the summary buffer if `mail-bury-selects-summary' is