gtkdnd: Account for setting a same icon helper

g_set_object() will take care of ref'ing before destroying the previous
instance, which might actually be the same pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=751401
This commit is contained in:
Carlos Garnacho 2015-07-06 19:33:49 +02:00
parent 4b31962475
commit dadb2750b1

View File

@ -3141,10 +3141,7 @@ set_icon_helper (GdkDragContext *context,
info = gtk_drag_get_source_info (context, FALSE);
if (info->icon_helper)
g_object_unref (info->icon_helper);
info->icon_helper = g_object_ref (helper);
g_set_object (&info->icon_helper, helper);
gtk_drag_set_icon_window (context, NULL, hot_x, hot_y, TRUE);
}
else