* mm-decode.el (mm-shr): Allow use from non-Gnus users.
[gnus] / lisp / mm-decode.el
index 8be4bb7..1a05b4d 100644 (file)
@@ -1691,8 +1691,11 @@ If RECURSIVE, search recursively."
   ;; Require since we bind its variables.
   (require 'shr)
   (let ((article-buffer (current-buffer))
-       (shr-blocked-images (with-current-buffer gnus-summary-buffer
-                             gnus-blocked-images))
+       (shr-blocked-images (if (and (boundp gnus-summary-buffer)
+                                    (buffer-name gnus-summary-buffer))
+                               (with-current-buffer gnus-summary-buffer
+                                 gnus-blocked-images)
+                             shr-blocked-images))
        (shr-content-function (lambda (id)
                                (let ((handle (mm-get-content-id id)))
                                  (when handle