summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-03-18 16:10:04 +0300
committerStefano Karapetsas <[email protected]>2015-03-19 09:30:28 +0100
commitc69374566247cea1a63bb4551e3a91dd0156b28f (patch)
tree5d534a0e986a9fc343ec90b105c1db340519c24a
parentaeccda42c6da068ec646b9be32c1e9e96ac09353 (diff)
downloadcaja-c69374566247cea1a63bb4551e3a91dd0156b28f.tar.bz2
caja-c69374566247cea1a63bb4551e3a91dd0156b28f.tar.xz
places-sidebar: fix crash
taken from upstream commits: https://git.gnome.org/browse/nautilus/commit/?id=cda2c75df4b95a481e8b774081ec1240d47fa45f https://git.gnome.org/browse/nautilus/commit/?id=4764a856c7a6e5a84d4067e7b105c09a93ffdbe4 Closes https://github.com/mate-desktop/caja/pull/395
-rw-r--r--src/caja-places-sidebar.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/caja-places-sidebar.c b/src/caja-places-sidebar.c
index 6fbc2659..643bf488 100644
--- a/src/caja-places-sidebar.c
+++ b/src/caja-places-sidebar.c
@@ -1360,7 +1360,7 @@ reorder_bookmarks (CajaPlacesSidebar *sidebar,
/* Get the selected path */
if (!get_selected_iter (sidebar, &iter))
- g_assert_not_reached ();
+ return;
gtk_tree_model_get (GTK_TREE_MODEL (sidebar->filter_model), &iter,
PLACES_SIDEBAR_COLUMN_ROW_TYPE, &type,
@@ -1425,7 +1425,9 @@ drag_data_received_callback (GtkWidget *widget,
}
/* Compute position */
- compute_drop_position (tree_view, x, y, &tree_path, &tree_pos, sidebar);
+ success = compute_drop_position (tree_view, x, y, &tree_path, &tree_pos, sidebar);
+ if (!success)
+ goto out;
success = FALSE;