Protect against groups that come from no known methods.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sat, 4 Sep 2010 19:22:37 +0000 (21:22 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sat, 4 Sep 2010 19:22:37 +0000 (21:22 +0200)
lisp/ChangeLog
lisp/gnus-start.el

index f83ae7a..76d2f36 100644 (file)
@@ -1,5 +1,8 @@
 2010-09-04  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-start.el (gnus-get-unread-articles): Protect against groups that
+       come from no known methods.
+
        * pop3.el (pop3-display-message-size-flag): Removed -- everybody wants
        message sizes.
        (pop3-movemail): Use erase-buffer instead of looping and deleting
index b111f5c..c7d8552 100644 (file)
@@ -1747,18 +1747,19 @@ If SCAN, request a scan of that group as well."
            infos (nth 2 (car type-cache)))
       (pop type-cache)
 
-      ;; See if any of the groups from this method require updating.
-      (when (block nil
-             (dolist (info infos)
-               (when (<= (gnus-info-level info)
-                         (if (eq method-type 'foreign)
-                             foreign-level
-                           alevel))
-                 (return t))))
-       (gnus-read-active-for-groups method infos)
-       (dolist (info infos)
-         (inline (gnus-get-unread-articles-in-group
-                  info (gnus-active (gnus-info-group info)))))))
+      (when method
+       ;; See if any of the groups from this method require updating.
+       (when (block nil
+               (dolist (info infos)
+                 (when (<= (gnus-info-level info)
+                           (if (eq method-type 'foreign)
+                               foreign-level
+                             alevel))
+                   (return t))))
+         (gnus-read-active-for-groups method infos)
+         (dolist (info infos)
+           (inline (gnus-get-unread-articles-in-group
+                    info (gnus-active (gnus-info-group info))))))))
     (gnus-message 6 "Checking new news...done")))
 
 (defun gnus-method-rank (type method)