summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2011-02-15 09:11:44 -0500
committerSøren Sandmann Pedersen <ssp@redhat.com>2011-02-18 06:21:38 -0500
commit510c0d088a975efe75cc2b796547f3aaed1c18e6 (patch)
treea53ac1dc78584cac01133fa24352786549d6a007
parent7feb710e60cdab5c448a396537a8de16e72091e2 (diff)
In pixman_image_set_transform() allow NULL for transform
Previously, this would crash unless the existing transform were also NULL.
-rw-r--r--pixman/pixman-image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index 55fc17ac..9103ca6c 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -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;