forked from AuroraMiddleware/gtk
GskTransform: Avoid a ref+unref pair
If gsk_transform_is_identity() returned FALSE for the next transform, the previous code did a ref + unref pair, even though it was unneeded.
This commit is contained in:
parent
21299cc7e4
commit
bd5d1615ac
@ -127,8 +127,10 @@ gsk_transform_alloc (const GskTransformClass *transform_class,
|
|||||||
|
|
||||||
self->transform_class = transform_class;
|
self->transform_class = transform_class;
|
||||||
self->category = next ? MIN (category, next->category) : category;
|
self->category = next ? MIN (category, next->category) : category;
|
||||||
self->next = gsk_transform_is_identity (next) ? NULL : gsk_transform_ref (next);
|
if (gsk_transform_is_identity (next))
|
||||||
g_clear_pointer (&next, gsk_transform_unref);
|
gsk_transform_unref (next);
|
||||||
|
else
|
||||||
|
self->next = next;
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user