libgimp: bail out early in gimp_image_metadata_save_finish()

if no GimpMetadataSaveFlags are set.
This commit is contained in:
Michael Natterer 2013-11-11 23:31:58 +01:00
parent 7aeb9da6e3
commit c8bd782268
1 changed files with 6 additions and 0 deletions

View File

@ -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);