Commit 7a623988 authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

Fix leak in GtkStyle.

parent 05254766
...@@ -745,9 +745,14 @@ gtk_style_update_from_context (GtkStyle *style) ...@@ -745,9 +745,14 @@ gtk_style_update_from_context (GtkStyle *style)
style->white.blue = 0xffff; style->white.blue = 0xffff;
for (i = 0; i < 5; i++) for (i = 0; i < 5; i++)
style->background[i] = cairo_pattern_create_rgb (style->bg[i].red / 65535.0, {
style->bg[i].green / 65535.0, if (style->background[i])
style->bg[i].blue / 65535.0); cairo_pattern_destroy (style->background[i]);
style->background[i] = cairo_pattern_create_rgb (style->bg[i].red / 65535.0,
style->bg[i].green / 65535.0,
style->bg[i].blue / 65535.0);
}
} }
static void static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment