In pixman_image_set_transform() allow NULL for transform
authorSøren Sandmann Pedersen <ssp@redhat.com>
Tue, 15 Feb 2011 14:11:44 +0000 (09:11 -0500)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Fri, 18 Feb 2011 11:21:38 +0000 (06:21 -0500)
Previously, this would crash unless the existing transform were also
NULL.

pixman/pixman-image.c

index 55fc17a..9103ca6 100644 (file)
@@ -502,7 +502,7 @@ pixman_image_set_transform (pixman_image_t *          image,
     if (common->transform == transform)
        return TRUE;
 
-    if (memcmp (&id, transform, sizeof (pixman_transform_t)) == 0)
+    if (!transform || memcmp (&id, transform, sizeof (pixman_transform_t)) == 0)
     {
        free (common->transform);
        common->transform = NULL;