summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2015-05-19 15:15:25 +0300
committermonsta <[email protected]>2015-05-19 15:15:25 +0300
commit613ffcf405be195fad0a49d778f0e57e0812de22 (patch)
treec537306046e71868326456854c2fcb6ff53271dc
parent568d02d53aecd1d9b8163a7f8c48d51744e03390 (diff)
parent0de3e198db38b4e819159d958148bb386430d4dc (diff)
downloadcaja-613ffcf405be195fad0a49d778f0e57e0812de22.tar.bz2
caja-613ffcf405be195fad0a49d778f0e57e0812de22.tar.xz
Merge pull request #396 from monsta/asserts-must-die-1.8
[1.8] places-sidebar: fix crash
-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 0e1ce9c4..f7974970 100644
--- a/src/caja-places-sidebar.c
+++ b/src/caja-places-sidebar.c
@@ -1455,7 +1455,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,
@@ -1520,7 +1520,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;