# HG changeset patch # User nadvornik # Date 1266183311 0 # Node ID 203404cc8e98149e97d6c6830667feed6f0d3f64 # Parent a210f58165edf24c823d1a4132fdc1db5a32cc7b fixed reference count there was a bug in reference count on writting unsaved metadata before starting an external editor diff -r a210f58165ed -r 203404cc8e98 src/utilops.c --- a/src/utilops.c Sun Feb 07 13:16:35 2010 +0000 +++ b/src/utilops.c Sun Feb 14 21:35:11 2010 +0000 @@ -2744,11 +2744,15 @@ 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)); } }