dnd: Make dest side safe against destroy

Use a weak pointer to clean up when the current drag destination
gets destroyed.
This commit is contained in:
Matthias Clasen 2015-01-29 23:45:28 -05:00
parent 90d42ef5cc
commit 650c25e06c

View File

@ -1928,6 +1928,7 @@ gtk_drag_find_widget (GtkWidget *widget,
}
info->widget = widget;
g_object_add_weak_pointer (G_OBJECT (widget), (gpointer *) &info->widget);
}
}
@ -3569,7 +3570,6 @@ _gtk_drag_source_handle_event (GtkWidget *widget,
case GDK_DRAG_STATUS:
{
GdkCursor *cursor;
if (info->proxy_dest)
{
if (!event->dnd.send_event)