summaryrefslogtreecommitdiff
path: root/lisp/gnus-cache.el
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>1996-07-02 23:37:45 +0000
committerLars Magne Ingebrigtsen <larsi@gnus.org>1996-07-02 23:37:45 +0000
commitceddd3fd68e88a881467f47ce784a18f124fbc0a (patch)
tree8fb9a56dedaa414534bc2d3f58eadd4b4645d2da /lisp/gnus-cache.el
parent5bb005953ee367510e74c5c2a30e954d5446f167 (diff)
downloademacs-ceddd3fd68e88a881467f47ce784a18f124fbc0a.tar.gz
* gnus-cache.el (gnus-cache-possibly-alter-active): Check for
gnus-cache-active-hashtb before using it.
Diffstat (limited to 'lisp/gnus-cache.el')
-rw-r--r--lisp/gnus-cache.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el
index d44c4949d15..24b38c64667 100644
--- a/lisp/gnus-cache.el
+++ b/lisp/gnus-cache.el
@@ -236,13 +236,14 @@ variable to \"^nnml\".")
(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."