mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 03:10:09 +00:00
Avoid memory corruption in the color_properties hashtable.
This commit is contained in:
parent
d351b40a0b
commit
e0efd067e4
@ -282,11 +282,15 @@ gtk_modifier_style_set_color_property (GtkModifierStyle *style,
|
||||
}
|
||||
|
||||
if (color)
|
||||
g_hash_table_insert (priv->color_properties, str,
|
||||
gdk_rgba_copy (color));
|
||||
{
|
||||
g_hash_table_insert (priv->color_properties, str,
|
||||
gdk_rgba_copy (color));
|
||||
}
|
||||
else
|
||||
g_hash_table_remove (priv->color_properties, str);
|
||||
{
|
||||
g_hash_table_remove (priv->color_properties, str);
|
||||
g_free (str);
|
||||
}
|
||||
|
||||
g_signal_emit (style, signals[CHANGED], 0);
|
||||
g_free (str);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user