From 1c9cc0acf03f1097322fdf21c47267ab6e2f6cbc Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 22 Jan 2010 21:08:11 +0100 Subject: [PATCH] Small memory fix --- gtk/gtkdnd-quartz.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c index 3cd4fb3f48..6c5a5ae501 100644 --- a/gtk/gtkdnd-quartz.c +++ b/gtk/gtkdnd-quartz.c @@ -505,8 +505,6 @@ gtk_drag_dest_set (GtkWidget *widget, old_site = g_object_get_data (G_OBJECT (widget), "gtk-drag-dest"); - gtk_drag_dest_unset (widget); - site = g_new (GtkDragDestSite, 1); site->flags = flags; site->have_drag = FALSE; @@ -521,6 +519,8 @@ gtk_drag_dest_set (GtkWidget *widget, else site->track_motion = FALSE; + gtk_drag_dest_unset (widget); + if (GTK_WIDGET_REALIZED (widget)) gtk_drag_dest_realized (widget, site);