# HG changeset patch # User Katsumi Yamaoka # Date 1283386431 0 # Node ID 3e3e1965a2c2aa4927ced952001c99541066f416 # Parent 19dfa5177fdd078283e0a15f8bc061b7a61810d5 gnus-html.el: We can't rescale if we don't have the article buffer in a window. diff -r 19dfa5177fdd -r 3e3e1965a2c2 lisp/gnus/gnus-html.el --- a/lisp/gnus/gnus-html.el Thu Sep 02 00:08:22 2010 +0000 +++ b/lisp/gnus/gnus-html.el Thu Sep 02 00:13:51 2010 +0000 @@ -243,11 +243,12 @@ nil))))) (defun gnus-html-rescale-image (image) - (if (not (fboundp 'imagemagick-types)) + (if (or (not (fboundp 'imagemagick-types)) + (not (get-buffer-window (current-buffer)))) image (let* ((width (car (image-size image t))) (height (cdr (image-size image t))) - (edges (window-pixel-edges)) + (edges (window-pixel-edges (get-buffer-window (current-buffer)))) (window-width (truncate (* gnus-max-image-proportion (- (nth 2 edges) (nth 0 edges))))) (window-height (truncate (* gnus-max-image-proportion