[gimp] app: don't set the same GFile again in gimp_imagefile_set_file()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't set the same GFile again in gimp_imagefile_set_file()
- Date: Sun, 13 Jul 2014 17:16:30 +0000 (UTC)
commit 83f69aa9fb337beafd5b54f283ab8dd22967ac70
Author: Michael Natterer <mitch gimp org>
Date: Sun Jul 13 19:13:11 2014 +0200
app: don't set the same GFile again in gimp_imagefile_set_file()
I don't think this can happen, but better safe than sorry.
app/core/gimpimagefile.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpimagefile.c b/app/core/gimpimagefile.c
index d4330e6..4e4d6da 100644
--- a/app/core/gimpimagefile.c
+++ b/app/core/gimpimagefile.c
@@ -341,8 +341,11 @@ gimp_imagefile_set_file (GimpImagefile *imagefile,
g_return_if_fail (GIMP_IS_IMAGEFILE (imagefile));
g_return_if_fail (file == NULL || G_IS_FILE (file));
- gimp_object_take_name (GIMP_OBJECT (imagefile),
- file ? g_file_get_uri (file) : NULL);
+ if (GET_PRIVATE (imagefile)->file != file)
+ {
+ gimp_object_take_name (GIMP_OBJECT (imagefile),
+ file ? g_file_get_uri (file) : NULL);
+ }
}
GimpThumbnail *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]