mirror of https://github.com/GNOME/gimp.git
Bug 599797 - Crash on "Refresh dynamics" if ~/.gimp-2.7/dynamics folder is missing
(gimp_data_factory_refresh_cache_add): don't add data objects without filename to the refresh cache. Regardless why they have no filename, they can't be reloaded anyway (in this case it's newly created objects that couldn't be saved because there is no folder to save them).
This commit is contained in:
parent
223cbeb6fb
commit
cfa76869d6
|
@ -244,17 +244,20 @@ gimp_data_factory_refresh_cache_add (GimpDataFactory *factory,
|
||||||
GimpData *data,
|
GimpData *data,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GHashTable *cache = user_data;
|
if (data->filename)
|
||||||
GList *list;
|
{
|
||||||
|
GHashTable *cache = user_data;
|
||||||
|
GList *list;
|
||||||
|
|
||||||
g_object_ref (data);
|
g_object_ref (data);
|
||||||
|
|
||||||
gimp_container_remove (factory->priv->container, GIMP_OBJECT (data));
|
gimp_container_remove (factory->priv->container, GIMP_OBJECT (data));
|
||||||
|
|
||||||
list = g_hash_table_lookup (cache, data->filename);
|
list = g_hash_table_lookup (cache, data->filename);
|
||||||
list = g_list_prepend (list, data);
|
list = g_list_prepend (list, data);
|
||||||
|
|
||||||
g_hash_table_insert (cache, (gpointer) data->filename, list);
|
g_hash_table_insert (cache, (gpointer) data->filename, list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in New Issue