[gimp] libgimp: bail out early in gimp_image_metadata_save_finish()



commit c8bd78226848db1c5b7e1348e8e56b9316f9f54d
Author: Michael Natterer <mitch gimp org>
Date:   Mon Nov 11 23:31:58 2013 +0100

    libgimp: bail out early in gimp_image_metadata_save_finish()
    
    if no GimpMetadataSaveFlags are set.

 libgimp/gimpmetadata.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libgimp/gimpmetadata.c b/libgimp/gimpmetadata.c
index 2142acc..763ff27 100644
--- a/libgimp/gimpmetadata.c
+++ b/libgimp/gimpmetadata.c
@@ -353,6 +353,12 @@ gimp_image_metadata_save_finish (gint32                  image_ID,
   g_return_val_if_fail (G_IS_FILE (file), FALSE);
   g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
 
+  if (! (flags & (GIMP_METADATA_SAVE_EXIF ||
+                  GIMP_METADATA_SAVE_XMP  ||
+                  GIMP_METADATA_SAVE_IPTC ||
+                  GIMP_METADATA_SAVE_THUMBNAIL)))
+    return TRUE;
+
   /* read metadata from saved file */
   new_metadata = gimp_metadata_load_from_file (file, error);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]