Small memory fix

This commit is contained in:
Paul Davis 2010-01-22 21:08:11 +01:00 committed by Tristan Van Berkom
parent 88977f73eb
commit 1c9cc0acf0

View File

@ -505,8 +505,6 @@ gtk_drag_dest_set (GtkWidget *widget,
old_site = g_object_get_data (G_OBJECT (widget), "gtk-drag-dest"); old_site = g_object_get_data (G_OBJECT (widget), "gtk-drag-dest");
gtk_drag_dest_unset (widget);
site = g_new (GtkDragDestSite, 1); site = g_new (GtkDragDestSite, 1);
site->flags = flags; site->flags = flags;
site->have_drag = FALSE; site->have_drag = FALSE;
@ -521,6 +519,8 @@ gtk_drag_dest_set (GtkWidget *widget,
else else
site->track_motion = FALSE; site->track_motion = FALSE;
gtk_drag_dest_unset (widget);
if (GTK_WIDGET_REALIZED (widget)) if (GTK_WIDGET_REALIZED (widget))
gtk_drag_dest_realized (widget, site); gtk_drag_dest_realized (widget, site);