diff options
| author | Eli Zaretskii | 2019-07-03 10:31:48 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-07-03 10:31:48 +0300 |
| commit | ecd7d40a3be0b3b51743fc2c2e98dd14c6faca84 (patch) | |
| tree | 13f5e142ec321e31fc16fe81b262956a7baa8083 /src/image.c | |
| parent | b5de191e8782ae857a74e0dd4293032c0dd68b11 (diff) | |
| download | emacs-ecd7d40a3be0b3b51743fc2c2e98dd14c6faca84.tar.gz emacs-ecd7d40a3be0b3b51743fc2c2e98dd14c6faca84.zip | |
Fix rotation validity test in image.c
* src/image.c (compute_image_rotation): Fix the validity test
for :rotation values. This avoids logging error messages when
no :rotation was provided in the image spec.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/image.c b/src/image.c index d44a9d3dc27..6ead12166b6 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -2065,7 +2065,10 @@ matrix3x3_mult (matrix3x3 a, matrix3x3 b, matrix3x3 result) | |||
| 2065 | static void | 2065 | static void |
| 2066 | compute_image_rotation (struct image *img, double *rotation) | 2066 | compute_image_rotation (struct image *img, double *rotation) |
| 2067 | { | 2067 | { |
| 2068 | Lisp_Object value = image_spec_value (img->spec, QCrotation, NULL); | 2068 | bool foundp = false; |
| 2069 | Lisp_Object value = image_spec_value (img->spec, QCrotation, &foundp); | ||
| 2070 | if (!foundp) | ||
| 2071 | return; | ||
| 2069 | if (! NUMBERP (value)) | 2072 | if (! NUMBERP (value)) |
| 2070 | { | 2073 | { |
| 2071 | image_error ("Invalid image `:rotation' parameter"); | 2074 | image_error ("Invalid image `:rotation' parameter"); |