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
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