[file-roller] new archive: fixed crash when a file alreaady exists



commit 848b209d3369eaefe2bf05035443b53d3deeea5f
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri Aug 10 13:23:14 2012 +0200

    new archive: fixed crash when a file alreaady exists

 src/fr-new-archive-dialog.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/fr-new-archive-dialog.c b/src/fr-new-archive-dialog.c
index 2574d22..64715a0 100644
--- a/src/fr-new-archive-dialog.c
+++ b/src/fr-new-archive-dialog.c
@@ -405,8 +405,6 @@ fr_new_archive_dialog_get_file (FrNewArchiveDialog  *self,
 		return NULL;
 	}
 
-	g_object_unref (parent_info);
-
 	/* overwrite confirmation */
 
 	if (g_file_query_exists (file, NULL)) {
@@ -446,6 +444,7 @@ fr_new_archive_dialog_get_file (FrNewArchiveDialog  *self,
 
 				gtk_widget_destroy (GTK_WIDGET (dialog));
 				g_error_free (error);
+				g_object_unref (parent_info);
 				g_object_unref (file);
 
 				return NULL;
@@ -455,6 +454,8 @@ fr_new_archive_dialog_get_file (FrNewArchiveDialog  *self,
 			g_clear_object (&file);
 	}
 
+	g_object_unref (parent_info);
+
 	return file;
 }
 



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