[nautilus] nautilus-canvas-dnd.c: destroy drag_info.selection_cache on drag_end_callback()



commit 4f05a1be296082541a6009374f64e3d86e9e56df
Author: Timothy OBrien <obrien timothy a gmail com>
Date:   Wed Jan 16 23:53:39 2019 +1100

    nautilus-canvas-dnd.c: destroy drag_info.selection_cache on drag_end_callback()
    
    When the user is dragging items between locations, a drag_info.selection_cache is initialized within 
drag_begin_callback(). However, unlike other caches, the drag_info.selection_cache is never destroyed by 
drag_end_callback() once the drag operation is complete.
    
    This patch frees the drag_info.selection_cache once the user drag action is complete.
    
    Fixes #787

 src/nautilus-canvas-dnd.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/nautilus-canvas-dnd.c b/src/nautilus-canvas-dnd.c
index 388536a11..ef83c443f 100644
--- a/src/nautilus-canvas-dnd.c
+++ b/src/nautilus-canvas-dnd.c
@@ -593,8 +593,10 @@ drag_end_callback (GtkWidget      *widget,
 
     stop_cache_selection_list (&dnd_info->drag_info);
     nautilus_drag_destroy_selection_list (dnd_info->drag_info.selection_list);
+    nautilus_drag_destroy_selection_list (dnd_info->drag_info.selection_cache);
     nautilus_drag_destroy_selection_list (container->details->dnd_source_info->selection_cache);
     dnd_info->drag_info.selection_list = NULL;
+    dnd_info->drag_info.selection_cache = NULL;
     container->details->dnd_source_info->selection_cache = NULL;
 
     nautilus_window_end_dnd (window, context);


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