commit 8696231b263d0f064280f29a21a3cd307472ea92
Author: Tom Hughes <tom@compton.nu>
Date:   Sat Mar 21 20:54:50 2015 +0000

    Remove weak pointers when we no longer need them
    
    In commit 650c25e06c175c3c35782acbdd5db784372f126c a weak pointer
    was added but no attempt was made to clean it up again when it was
    no longer needed or when the object holding it was destroyed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746602

diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 576f67d..5515209 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -1637,6 +1637,7 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
     case GDK_DRAG_LEAVE:
       if (info->widget)
         {
+          g_object_remove_weak_pointer (G_OBJECT (info->widget), (gpointer *) &info->widget);
           gtk_drag_dest_leave (info->widget, context, event->dnd.time);
           info->widget = NULL;
         }
@@ -1657,6 +1658,7 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
              */
             if (info->widget)
               {
+                g_object_remove_weak_pointer (G_OBJECT (info->widget), (gpointer *) &info->widget);
                 gtk_drag_dest_leave (info->widget, context, event->dnd.time);
                 info->widget = NULL;
               }
@@ -1689,6 +1691,7 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
 
         if (info->widget && !found)
           {
+            g_object_remove_weak_pointer (G_OBJECT (info->widget), (gpointer *) &info->widget);
             gtk_drag_dest_leave (info->widget, context, event->dnd.time);
             info->widget = NULL;
           }
@@ -1918,10 +1921,11 @@ gtk_drag_find_widget (GtkWidget           *widget,
           found = callback (widget, context, x, y, time);
 
           /* If so, send a "drag-leave" to the last widget */
-          if (found)
+          if (found && info->widget != widget)
             {
-              if (info->widget && info->widget != widget)
+              if (info->widget)
                 {
+                  g_object_remove_weak_pointer (G_OBJECT (info->widget), (gpointer *) &info->widget);
                   gtk_drag_dest_leave (info->widget, context, time);
                 }
 
@@ -2011,6 +2015,11 @@ gtk_drag_proxy_begin (GtkWidget       *widget,
 static void
 gtk_drag_dest_info_destroy (gpointer data)
 {
+  GtkDragDestInfo *info = (GtkDragDestInfo *)data;
+  if (info->widget)
+    {
+      g_object_remove_weak_pointer (G_OBJECT (info->widget), (gpointer *) &info->widget);
+    }
   g_slice_free (GtkDragDestInfo, data);
 }
 
