summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2019-07-03 10:31:48 +0300
committerEli Zaretskii <eliz@gnu.org>2019-07-03 10:31:48 +0300
commitecd7d40a3be0b3b51743fc2c2e98dd14c6faca84 (patch)
tree13f5e142ec321e31fc16fe81b262956a7baa8083
parentb5de191e8782ae857a74e0dd4293032c0dd68b11 (diff)
downloademacs-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.c5
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");