From: Lars Magne Ingebrigtsen Date: Thu, 2 Sep 2010 00:13:51 +0000 (+0000) Subject: gnus-html.el: We can't rescale if we don't have the article buffer in a window. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~48^2~153 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e5e2587e9eb197028c11bd2f4f55c2b52692c580;p=emacs.git gnus-html.el: We can't rescale if we don't have the article buffer in a window. --- diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index 3ce379748e0..49e0ea62949 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el @@ -243,11 +243,12 @@ fit these criteria." 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