gnus-art.el (gnus-article-stop-animations): Use gnus-timer--function that is an alias...
[bpt/emacs.git] / lisp / gnus / gnus-art.el
index bb374fb..7dcbd61 100644 (file)
@@ -2437,9 +2437,10 @@ long lines if and only if arg is positive."
                        (apply 'gnus-create-image png 'png t
                               (cdr (assq 'png gnus-face-properties-alist))))
                  (goto-char from)
-                 (gnus-add-wash-type 'face)
-                 (gnus-add-image 'face image)
-                 (gnus-put-image image nil 'face))))))))))
+                 (when image
+                   (gnus-add-wash-type 'face)
+                   (gnus-add-image 'face image)
+                   (gnus-put-image image nil 'face)))))))))))
 
 (defun article-display-x-face (&optional force)
   "Look for an X-Face header and display it if present."
@@ -4553,7 +4554,7 @@ commands:
 (defun gnus-article-stop-animations ()
   (dolist (timer (and (boundp 'timer-list)
                      timer-list))
-    (when (eq (elt timer 5) 'image-animate-timeout)
+    (when (eq (gnus-timer--function timer) 'image-animate-timeout)
       (cancel-timer timer))))
 
 (defun gnus-stop-downloads ()