summaryrefslogtreecommitdiff
path: root/libnautilus-private
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-10-09 19:19:42 +0200
committerAlexander Larsson <alexl@redhat.com>2009-10-20 13:09:19 +0200
commit4bd9cb8d3e1b59667334550472b1ffd6a6768e73 (patch)
tree664ed4e1421131dd942c5561897a06bae35cd60a /libnautilus-private
parentaf69ce7e9ba5e5150e28aad3d78f8dc8117846ce (diff)
downloadnautilus-4bd9cb8d3e1b59667334550472b1ffd6a6768e73.tar.gz
Always check if the drag dest supports the source.
In the "drag-motion" callback, make sure we check for target != GDK_NONE before getting non-existent data for it.
Diffstat (limited to 'libnautilus-private')
-rw-r--r--libnautilus-private/nautilus-dnd.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libnautilus-private/nautilus-dnd.c b/libnautilus-private/nautilus-dnd.c
index b7e1df2cf..15b6395ed 100644
--- a/libnautilus-private/nautilus-dnd.c
+++ b/libnautilus-private/nautilus-dnd.c
@@ -1010,7 +1010,7 @@ nautilus_drag_selection_includes_special_link (GList *selection_list)
return FALSE;
}
-static void
+static gboolean
slot_proxy_drag_motion (GtkWidget *widget,
GdkDragContext *context,
int x,
@@ -1038,6 +1038,11 @@ slot_proxy_drag_motion (GtkWidget *widget,
if (!drag_info->have_data) {
target = gtk_drag_dest_find_target (widget, context, NULL);
+
+ if (target == GDK_NONE) {
+ goto out;
+ }
+
gtk_drag_get_data (widget, context, target, time);
}
@@ -1079,6 +1084,8 @@ out:
}
gdk_drag_status (context, action, time);
+
+ return TRUE;
}
static void