mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-19 21:40:22 +00:00
css: Avoid a possible memory leak
Currently, style->variables is always NULL when we get here, but better to be safe than sorry, and clear the fields before we overwrite it.
This commit is contained in:
parent
a19d0471e9
commit
73f64971c8
@ -865,6 +865,7 @@ gtk_css_lookup_resolve (GtkCssLookup *lookup,
|
||||
}
|
||||
else if (parent_style && parent_style->variables)
|
||||
{
|
||||
g_clear_pointer (&style->variables, gtk_css_variable_set_unref);
|
||||
style->variables = gtk_css_variable_set_ref (parent_style->variables);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user