diff lisp/gnus-cache.el @ 15589:15f033c2250f

* gnus-cache.el (gnus-cache-possibly-alter-active): Check for gnus-cache-active-hashtb before using it.
author Lars Magne Ingebrigtsen <larsi@gnus.org>
date Tue, 02 Jul 1996 23:37:45 +0000
parents 8d8bf85d356a
children 6101ab54d20a
line wrap: on
line diff
--- a/lisp/gnus-cache.el	Tue Jul 02 16:27:07 1996 +0000
+++ b/lisp/gnus-cache.el	Tue Jul 02 23:37:45 1996 +0000
@@ -236,13 +236,14 @@
 
 (defun gnus-cache-possibly-alter-active (group active)
   "Alter the ACTIVE info for GROUP to reflect the articles in the cache."
-  (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb)))
-    (and cache-active 
-	 (< (car cache-active) (car active))
-	 (setcar active (car cache-active)))
-    (and cache-active
-	 (> (cdr cache-active) (cdr active))
-	 (setcdr active (cdr cache-active)))))
+  (when gnus-cache-active-hashtb
+    (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb)))
+      (and cache-active 
+	   (< (car cache-active) (car active))
+	   (setcar active (car cache-active)))
+      (and cache-active
+	   (> (cdr cache-active) (cdr active))
+	   (setcdr active (cdr cache-active))))))
 
 (defun gnus-cache-retrieve-headers (articles group &optional fetch-old)
   "Retrieve the headers for ARTICLES in GROUP."