[file-roller] fr-window: fix crash on _fr_window_ask_overwrite_dialog() function
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] fr-window: fix crash on _fr_window_ask_overwrite_dialog() function
- Date: Sun, 27 Oct 2013 12:27:41 +0000 (UTC)
commit bf1316f0c04fb2f0efbb9642de44d848c04c9a22
Author: Nelson Benítez León <nbenitezl+gnome gmail com>
Date: Sat Oct 19 17:31:48 2013 +0200
fr-window: fix crash on _fr_window_ask_overwrite_dialog() function
Don't immediatly unref 'destination' after passing it to
g_file_query_info_async() , instead unref it from within the callback
for the aforementioned function when it's done with it.
src/fr-window.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index 3c459f5..3747f5e 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -6601,6 +6601,7 @@ query_info_ready_for_overwrite_dialog_cb (GObject *source_object,
if (info == NULL) {
odata->current_file = odata->current_file->next;
_fr_window_ask_overwrite_dialog (odata);
+ g_object_unref (destination);
return;
}
@@ -6636,11 +6637,13 @@ query_info_ready_for_overwrite_dialog_cb (GObject *source_object,
g_free (parent_name);
g_object_unref (parent);
g_object_unref (info);
+ g_object_unref (destination);
return;
}
g_object_unref (info);
+ g_object_unref (destination);
odata->current_file = odata->current_file->next;
_fr_window_ask_overwrite_dialog (odata);
@@ -6667,7 +6670,6 @@ _fr_window_ask_overwrite_dialog (OverwriteData *odata)
query_info_ready_for_overwrite_dialog_cb,
odata);
- g_object_unref (destination);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]