Skip to content

Commit

Permalink
fixed reference count
Browse files Browse the repository at this point in the history
there was a bug in reference count on writting unsaved metadata
before starting an external editor
  • Loading branch information
nadvornik committed Feb 14, 2010
1 parent aa1e53c commit b6a2a9d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/utilops.c
Original file line number Diff line number Diff line change
Expand Up @@ -2744,11 +2744,15 @@ static gboolean file_util_write_metadata_first(UtilityType type, UtilityPhase ph
FileData *fd = work->data;
work = work->next;

if (fd->change) return FALSE; /* another op. in progress, let the caller handle it */
if (fd->change)
{
filelist_free(unsaved);
return FALSE; /* another op. in progress, let the caller handle it */
}

if (fd->modified_xmp) /* has unsaved metadata */
{
unsaved = g_list_prepend(unsaved, fd);
unsaved = g_list_prepend(unsaved, file_data_ref(fd));
}
}

Expand Down

0 comments on commit b6a2a9d

Please sign in to comment.