[gtk+/gtk-3-22] places sidebar: Don't leak a reference



commit 275bbbf88d6d8707cda671891e8d6a0909c4eb6b
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Nov 10 15:16:05 2016 -0500

    places sidebar: Don't leak a reference
    
    Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185

 gtk/gtkplacessidebar.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index b75c30f..e95eef3 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -3514,15 +3514,15 @@ on_button_press_event (GtkWidget      *widget,
                 "section_type", &section_type,
                 NULL);
 
-  if (section_type != SECTION_BOOKMARKS)
-    return FALSE;
-
-  sidebar->drag_row = GTK_WIDGET (row);
-  sidebar->drag_row_x = (gint)event->x;
-  sidebar->drag_row_y = (gint)event->y;
+  if (section_type == SECTION_BOOKMARKS)
+    {
+      sidebar->drag_row = GTK_WIDGET (row);
+      sidebar->drag_row_x = (gint)event->x;
+      sidebar->drag_row_y = (gint)event->y;
 
-  sidebar->drag_root_x = event->x_root;
-  sidebar->drag_root_y = event->y_root;
+      sidebar->drag_root_x = event->x_root;
+      sidebar->drag_root_y = event->y_root;
+    }
 
   g_object_unref (sidebar);
 


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