Bug 644891 - Ctrl+e crashes gimp

Don't freak out if setting an URI on GimpImage that was getted with
the corresponding getter. Fix by Massimo.
This commit is contained in:
Martin Nordholts 2011-03-17 20:23:09 +01:00
parent 584f9a35e7
commit 0d0ffd1265
1 changed files with 9 additions and 0 deletions

View File

@ -1648,6 +1648,9 @@ gimp_image_set_imported_uri (GimpImage *image,
{
g_return_if_fail (GIMP_IS_IMAGE (image));
if (gimp_image_get_imported_uri (image) == uri)
return;
g_object_set_data_full (G_OBJECT (image), GIMP_FILE_IMPORT_SOURCE_URI_KEY,
g_strdup (uri), (GDestroyNotify) g_free);
}
@ -1666,6 +1669,9 @@ gimp_image_set_exported_uri (GimpImage *image,
{
g_return_if_fail (GIMP_IS_IMAGE (image));
if (gimp_image_get_exported_uri (image) == uri)
return;
g_object_set_data_full (G_OBJECT (image),
GIMP_FILE_EXPORT_URI_KEY,
g_strdup (uri), (GDestroyNotify) g_free);
@ -1685,6 +1691,9 @@ gimp_image_set_save_a_copy_uri (GimpImage *image,
{
g_return_if_fail (GIMP_IS_IMAGE (image));
if (gimp_image_get_save_a_copy_uri (image) == uri)
return;
g_object_set_data_full (G_OBJECT (image),
GIMP_FILE_SAVE_A_COPY_URI_KEY,
g_strdup (uri), (GDestroyNotify) g_free);