1
Subject: places-sidebar: don't assert we have a valid selected iter
3
When reordering bookmarks, don't assert we have a selected iter, since
4
it might not always be the case.
6
https://bugzilla.gnome.org/show_bug.cgi?id=660876
8
Subject: places-sidebar: return if we fail to compute a drop position
10
Instead of using an invalid GtkTreePath, which could cause a segfault
13
https://bugzilla.gnome.org/show_bug.cgi?id=660876
15
Index: nautilus-3.2.1/src/nautilus-places-sidebar.c
16
===================================================================
17
--- nautilus-3.2.1.orig/src/nautilus-places-sidebar.c 2011-12-16 12:37:27.668145046 +0100
18
+++ nautilus-3.2.1/src/nautilus-places-sidebar.c 2011-12-16 12:37:30.692144939 +0100
22
/* Get the selected path */
24
- if (!get_selected_iter (sidebar, &iter))
25
- g_assert_not_reached ();
26
+ if (!get_selected_iter (sidebar, &iter)) {
30
gtk_tree_model_get (GTK_TREE_MODEL (sidebar->filter_model), &iter,
31
PLACES_SIDEBAR_COLUMN_ROW_TYPE, &type,
32
@@ -1439,7 +1439,10 @@
35
/* Compute position */
36
- compute_drop_position (tree_view, x, y, &tree_path, &tree_pos, sidebar);
37
+ success = compute_drop_position (tree_view, x, y, &tree_path, &tree_pos, sidebar);