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:
Carlos Garnacho 2011-05-30 19:04:22 +02:00
parent 7a730ae213
commit 747dc65c2c

View File

@ -1088,7 +1088,7 @@ gtk_css_ruleset_add (GtkCssRuleset *ruleset,
GValue *value;
child = _gtk_style_property_lookup (parameters[i].name);
value = g_memdup (&parameters[i].value, sizeof (GValue));
value = g_slice_dup (GValue, &parameters[i].value);
gtk_css_ruleset_add (ruleset, child, value);
}
g_free (parameters);