emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ecd7d40: Fix rotation validity test in image.c


From: Eli Zaretskii
Subject: [Emacs-diffs] master ecd7d40: Fix rotation validity test in image.c
Date: Wed, 3 Jul 2019 03:33:15 -0400 (EDT)

branch: master
commit ecd7d40a3be0b3b51743fc2c2e98dd14c6faca84
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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.
---
 src/image.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/image.c b/src/image.c
index d44a9d3..6ead121 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");



reply via email to

[Prev in Thread] Current Thread [Next in Thread]