forked from AuroraMiddleware/gtk
gtkcssprovider: Use g_slice_dup() to copy GValues around
GValues stored in GtkCssRulesets are gslice managed, so don't g_memdup() GValues from shorthand properties. This fixes memory corruptions when reloading contents in a GtkCssProvider.
This commit is contained in:
parent
7a730ae213
commit
747dc65c2c
@ -1086,9 +1086,9 @@ gtk_css_ruleset_add (GtkCssRuleset *ruleset,
|
||||
{
|
||||
const GtkStyleProperty *child;
|
||||
GValue *value;
|
||||
|
||||
|
||||
child = _gtk_style_property_lookup (parameters[i].name);
|
||||
value = g_memdup (¶meters[i].value, sizeof (GValue));
|
||||
value = g_slice_dup (GValue, ¶meters[i].value);
|
||||
gtk_css_ruleset_add (ruleset, child, value);
|
||||
}
|
||||
g_free (parameters);
|
||||
|
Loading…
Reference in New Issue
Block a user