summaryrefslogtreecommitdiff
path: root/gsk/gsktransform.c
diff options
context:
space:
mode:
Diffstat (limited to 'gsk/gsktransform.c')
-rw-r--r--gsk/gsktransform.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c
index adc64ccc30..3f1e89ad43 100644
--- a/gsk/gsktransform.c
+++ b/gsk/gsktransform.c
@@ -127,8 +127,10 @@ gsk_transform_alloc (const GskTransformClass *transform_class,
self->transform_class = transform_class;
self->category = next ? MIN (category, next->category) : category;
- self->next = gsk_transform_is_identity (next) ? NULL : gsk_transform_ref (next);
- g_clear_pointer (&next, gsk_transform_unref);
+ if (gsk_transform_is_identity (next))
+ gsk_transform_unref (next);
+ else
+ self->next = next;
return self;
}