From: Lars Magne Ingebrigtsen Date: Tue, 2 Jul 1996 23:37:45 +0000 (+0000) Subject: * gnus-cache.el (gnus-cache-possibly-alter-active): Check for X-Git-Tag: emacs-19.34~273 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ccbf998d92ca3fcaa344cad6a07d6665891eaf30;p=emacs.git * gnus-cache.el (gnus-cache-possibly-alter-active): Check for gnus-cache-active-hashtb before using it. --- 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."