From: Paul Eggert Date: Fri, 29 Jul 2011 07:05:17 +0000 (-0700) Subject: * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189). X-Git-Tag: emacs-pretest-24.0.90~104^2~157^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e5d76069f08b5ccb5d10edd5242b363fd92aacac;p=emacs.git * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189). This is needed if max-image-size is a floating-point number. --- diff --git a/src/ChangeLog b/src/ChangeLog index 3eaa3d5eadd..6039a54c559 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-07-29 Paul Eggert + + * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189). + This is needed if max-image-size is a floating-point number. + 2011-07-28 Andreas Schwab * print.c (print_object): Print empty symbol as ##. diff --git a/src/image.c b/src/image.c index fb1d825fa54..d1091aec6f3 100644 --- a/src/image.c +++ b/src/image.c @@ -1053,9 +1053,13 @@ check_image_size (struct frame *f, int width, int height) && height <= XINT (Vmax_image_size)); else if (FLOATP (Vmax_image_size)) { - xassert (f); - w = FRAME_PIXEL_WIDTH (f); - h = FRAME_PIXEL_HEIGHT (f); + if (f != NULL) + { + w = FRAME_PIXEL_WIDTH (f); + h = FRAME_PIXEL_HEIGHT (f); + } + else + w = h = 1024; /* Arbitrary size for unknown frame. */ return (width <= XFLOAT_DATA (Vmax_image_size) * w && height <= XFLOAT_DATA (Vmax_image_size) * h); }