Commit e5d76069 authored by Paul Eggert's avatar Paul Eggert
Browse files

* image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).

This is needed if max-image-size is a floating-point number.
parent 29c8a348
2011-07-29 Paul Eggert <eggert@cs.ucla.edu>
* 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 <schwab@linux-m68k.org>
* print.c (print_object): Print empty symbol as ##.
......
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment