aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-07-29 00:05:17 -0700
committerPaul Eggert2011-07-29 00:05:17 -0700
commite5d76069f08b5ccb5d10edd5242b363fd92aacac (patch)
tree2e1aa6bcdabf56c63162ce5fab80639ef7c16ec3 /src
parent29c8a348c5c9f326af54a3d30f69cde98fe300bb (diff)
downloademacs-e5d76069f08b5ccb5d10edd5242b363fd92aacac.tar.gz
emacs-e5d76069f08b5ccb5d10edd5242b363fd92aacac.zip
* image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
This is needed if max-image-size is a floating-point number.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/image.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3eaa3d5eadd..6039a54c559 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-07-29 Paul Eggert <eggert@cs.ucla.edu>
2
3 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
4 This is needed if max-image-size is a floating-point number.
5
12011-07-28 Andreas Schwab <schwab@linux-m68k.org> 62011-07-28 Andreas Schwab <schwab@linux-m68k.org>
2 7
3 * print.c (print_object): Print empty symbol as ##. 8 * 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)
1053 && height <= XINT (Vmax_image_size)); 1053 && height <= XINT (Vmax_image_size));
1054 else if (FLOATP (Vmax_image_size)) 1054 else if (FLOATP (Vmax_image_size))
1055 { 1055 {
1056 xassert (f); 1056 if (f != NULL)
1057 w = FRAME_PIXEL_WIDTH (f); 1057 {
1058 h = FRAME_PIXEL_HEIGHT (f); 1058 w = FRAME_PIXEL_WIDTH (f);
1059 h = FRAME_PIXEL_HEIGHT (f);
1060 }
1061 else
1062 w = h = 1024; /* Arbitrary size for unknown frame. */
1059 return (width <= XFLOAT_DATA (Vmax_image_size) * w 1063 return (width <= XFLOAT_DATA (Vmax_image_size) * w
1060 && height <= XFLOAT_DATA (Vmax_image_size) * h); 1064 && height <= XFLOAT_DATA (Vmax_image_size) * h);
1061 } 1065 }