[file-roller/gnome-3-10] fr-window: fix crash on _fr_window_ask_overwrite_dialog() function



commit 6a727d60e13904ae88f9cffd8f94e16644b4a384
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]