mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 12:20:08 +00:00
gsk: gsk_border_node_new(): Fix dead cleanup code
The `gdk_color_finish()` calls are currently after the `return`,
so they are never executed. Move the `return` below the cleanup
code to avoid that.
Fixes: bd3d1f7715
("gsk: Add private border node api")
This commit is contained in:
parent
06b8863bf7
commit
3b0a4386a8
@ -2586,15 +2586,18 @@ gsk_border_node_new (const GskRoundedRect *outline,
|
||||
const float border_width[4],
|
||||
const GdkRGBA border_color[4])
|
||||
{
|
||||
GskRenderNode *node;
|
||||
GdkColor color[4];
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
gdk_color_init_from_rgba (&color[i], &border_color[i]);
|
||||
|
||||
return gsk_border_node_new2 (outline, border_width, color);
|
||||
node = gsk_border_node_new2 (outline, border_width, color);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
gdk_color_finish (&color[i]);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
/*< private >
|
||||
|
Loading…
Reference in New Issue
Block a user