Bugfix for a corner case in 'pixman_transform_is_inverse'
authorSiarhei Siamashka <siarhei.siamashka@nokia.com>
Mon, 10 Jan 2011 16:09:16 +0000 (18:09 +0200)
committerSiarhei Siamashka <siarhei.siamashka@nokia.com>
Sun, 16 Jan 2011 20:32:02 +0000 (22:32 +0200)
When 'pixman_transform_multiply' fails, the result of multiplication just
could not have been identity matrix (one of the values in the resulting
matrix can't be represented as 16.16 fixed point value). So it is safe
to return FALSE.

pixman/pixman-matrix.c

index abdfa05..f2f67ab 100644 (file)
@@ -425,7 +425,8 @@ pixman_transform_is_inverse (const struct pixman_transform *a,
 {
     struct pixman_transform t;
 
-    pixman_transform_multiply (&t, a, b);
+    if (!pixman_transform_multiply (&t, a, b))
+       return FALSE;
 
     return pixman_transform_is_identity (&t);
 }