[nautilus] view-icon-controller: Fix double-free



commit 7148aca89a9cff22b1e1865b3d8701ed60c48c7c
Author: Carlos Soriano <csoriano gnome org>
Date:   Sat May 13 00:01:26 2017 +0200

    view-icon-controller: Fix double-free
    
    We weren't taking a ref, but we were unrefing afterwards.

 src/nautilus-view-icon-controller.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c
index b082368..e7308a2 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -645,7 +645,7 @@ on_button_press_event (GtkWidget *widget,
         if (g_list_find (selection, selected_file) == NULL)
         {
             g_list_foreach (selection, (GFunc) g_object_unref, NULL);
-            selection = g_list_append (NULL, selected_file);
+            selection = g_list_append (NULL, g_object_ref (selected_file));
         }
         else
         {


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