diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2011-10-19 17:01:31 -0400 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-10-19 17:03:14 -0400 |
commit | 48d35e60cabb77fcb6a856b36409094e48451f39 (patch) | |
tree | f963e998d42f5ace124aa7e51917fba9f08ebd80 | |
parent | b70fd365d48aca898a90025b3a86b5af48cc91db (diff) | |
download | nautilus-48d35e60cabb77fcb6a856b36409094e48451f39.tar.gz |
places-sidebar: return if we fail to compute a drop position
Instead of using an invalid GtkTreePath, which could cause a segfault
later.
https://bugzilla.gnome.org/show_bug.cgi?id=660876
-rw-r--r-- | src/nautilus-places-sidebar.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c index 5ad71889f..945781023 100644 --- a/src/nautilus-places-sidebar.c +++ b/src/nautilus-places-sidebar.c @@ -1438,7 +1438,10 @@ 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; |