diff options
author | Eli Zaretskii <eliz@gnu.org> | 2019-07-03 10:31:48 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2019-07-03 10:31:48 +0300 |
commit | ecd7d40a3be0b3b51743fc2c2e98dd14c6faca84 (patch) | |
tree | 13f5e142ec321e31fc16fe81b262956a7baa8083 | |
parent | b5de191e8782ae857a74e0dd4293032c0dd68b11 (diff) | |
download | emacs-ecd7d40a3be0b3b51743fc2c2e98dd14c6faca84.tar.gz |
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.
-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) static void compute_image_rotation (struct image *img, double *rotation) { - Lisp_Object value = image_spec_value (img->spec, QCrotation, NULL); + bool foundp = false; + Lisp_Object value = image_spec_value (img->spec, QCrotation, &foundp); + if (!foundp) + return; if (! NUMBERP (value)) { image_error ("Invalid image `:rotation' parameter"); |