changeset 1797:203404cc8e98

fixed reference count there was a bug in reference count on writting unsaved metadata before starting an external editor
author nadvornik
date Sun, 14 Feb 2010 21:35:11 +0000
parents a210f58165ed
children 1cff176f8144
files src/utilops.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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));
 			}
 		}