diff options
| author | Paul Eggert | 2011-08-02 22:05:38 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-08-02 22:05:38 -0700 |
| commit | 9a70f03d70e44db2ec9c6d2952cb8a1deae15000 (patch) | |
| tree | c0efd5c0a208640c0a883f4566df1b40caa3aaad /src/image.c | |
| parent | 29c8a348c5c9f326af54a3d30f69cde98fe300bb (diff) | |
| download | emacs-9a70f03d70e44db2ec9c6d2952cb8a1deae15000.tar.gz emacs-9a70f03d70e44db2ec9c6d2952cb8a1deae15000.zip | |
Merge from trunk.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 10 |
1 files changed, 7 insertions, 3 deletions
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 | } |