app: don't use g_free() as key_destroy_func in a GType-keyed hash table

This would have crashed if we ever replaced or removed something in
that hash table. Instead, use g_object_unref() as value_destroy_func
because the table keeps GimpContainers which we would leak if we ever
removed anything from the table.
This commit is contained in:
Michael Natterer 2014-12-23 01:15:10 +01:00
parent ddda6a15c3
commit bbde1c48bd
1 changed files with 2 additions and 2 deletions

View File

@ -267,8 +267,8 @@ gimp_gegl_get_config_container (GType config_type)
if (! config_containers)
config_containers = g_hash_table_new_full (g_direct_hash,
g_direct_equal,
(GDestroyNotify) g_free,
NULL);
NULL,
(GDestroyNotify) g_object_unref);
container = g_hash_table_lookup (config_containers, (gpointer) config_type);