Plugged memory leak in gtk_style_finalize (destroy the ->background[] patterns).
This commit is contained in:
parent
4a5c435e9a
commit
c35fb706bd
@ -513,6 +513,7 @@ gtk_style_finalize (GObject *object)
|
||||
{
|
||||
GtkStyle *style = GTK_STYLE (object);
|
||||
GtkStylePrivate *priv = GTK_STYLE_GET_PRIVATE (style);
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (style->attach_count == 0);
|
||||
|
||||
@ -559,6 +560,12 @@ gtk_style_finalize (GObject *object)
|
||||
g_object_unref (priv->context);
|
||||
}
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
if (style->background[i])
|
||||
cairo_pattern_destroy (style->background[i]);
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gtk_style_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user