[nautilus/gnome-3-2] places-sidebar: return if we fail to compute a drop position



commit 48d35e60cabb77fcb6a856b36409094e48451f39
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Oct 19 17:01:31 2011 -0400

    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

 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 5ad7188..9457810 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;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]