Commit e150ea85 authored by Benjamin Otte's avatar Benjamin Otte
Browse files

cssnode: Don't leak the style cache on destruction

parent af958b86
......@@ -236,6 +236,8 @@ gtk_css_node_dispose (GObject *object)
gtk_css_node_set_invalid (cssnode, FALSE);
g_clear_pointer (&cssnode->cache, gtk_css_node_style_cache_unref);
G_OBJECT_CLASS (gtk_css_node_parent_class)->dispose (object);
......@@ -314,6 +316,7 @@ lookup_in_global_parent_cache (GtkCssNode *node,
if (parent->cache == NULL)
return NULL;
g_assert (node->cache == NULL);
node->cache = gtk_css_node_style_cache_lookup (parent->cache,
(GtkCssNodeDeclaration *) decl,
gtk_css_node_is_first_child (node),
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