gtkdnd: Disconnect GdkDragContext signals on gtk_drag_source_info_free()

Otherwise it may still be tricked into emitting further signals at a
time we've already destroyed the GtkDragSourceInfo passed as callback
user data.
This commit is contained in:
Carlos Garnacho 2016-01-20 18:53:03 +01:00
parent f535251507
commit 261622733c

View File

@ -3206,6 +3206,19 @@ gtk_drag_source_info_free (GtkDragSourceInfo *info)
static void
gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
{
g_signal_handlers_disconnect_by_func (info->context,
gtk_drag_context_drop_performed_cb,
info);
g_signal_handlers_disconnect_by_func (info->context,
gtk_drag_context_dnd_finished_cb,
info);
g_signal_handlers_disconnect_by_func (info->context,
gtk_drag_context_cancel_cb,
info);
g_signal_handlers_disconnect_by_func (info->context,
gtk_drag_context_action_cb,
info);
g_signal_handlers_disconnect_by_func (info->ipc_widget,
gtk_drag_grab_broken_event_cb,
info);