summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/caja-places-sidebar.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/caja-places-sidebar.c b/src/caja-places-sidebar.c
index 71d0bd59..78837dd3 100644
--- a/src/caja-places-sidebar.c
+++ b/src/caja-places-sidebar.c
@@ -823,6 +823,11 @@ over_eject_button (CajaPlacesSidebar *sidebar,
}
out:
+ if (*path != NULL) {
+ gtk_tree_path_free (*path);
+ *path = NULL;
+ }
+
return FALSE;
}
@@ -833,12 +838,11 @@ clicked_eject_button (CajaPlacesSidebar *sidebar,
GdkEvent *event = gtk_get_current_event ();
GdkEventButton *button_event = (GdkEventButton *) event;
- *path = NULL;
-
if ((event->type == GDK_BUTTON_PRESS || event->type == GDK_BUTTON_RELEASE) &&
over_eject_button (sidebar, button_event->x, button_event->y, path)) {
return TRUE;
}
+
return FALSE;
}
@@ -2609,6 +2613,8 @@ bookmarks_button_release_event_cb (GtkWidget *widget,
GtkTreeView *tree_view;
gboolean ret;
+ path = NULL;
+
if (event->type != GDK_BUTTON_RELEASE)
{
return TRUE;
@@ -2703,17 +2709,15 @@ bookmarks_motion_event_cb (GtkWidget *widget,
GtkTreeModel *model;
model = GTK_TREE_MODEL (sidebar->filter_model);
+ path = NULL;
if (over_eject_button (sidebar, event->x, event->y, &path)) {
update_eject_buttons (sidebar, path);
+ gtk_tree_path_free (path);
} else {
update_eject_buttons (sidebar, NULL);
}
- if (path) {
- gtk_tree_path_free (path);
- }
-
return TRUE;
}