fepitre / rpms / gtk3

Forked from rpms/gtk3 4 years ago
Clone
Blob Blame History Raw
From 34e6e1a599375da5665f4829faedf4c640f031a6 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Tue, 21 Jul 2015 12:03:52 -0400
Subject: [PATCH] Avoid g_set_object

One of the backported fixes brought in a dependency on new glib
that I didn't mean to introduce here. Avoid it.
---
 gtk/gtkdnd.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 364c382..8ff85ce 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -3258,7 +3258,11 @@ set_icon_helper (GdkDragContext *context,
 
       info = gtk_drag_get_source_info (context, FALSE);
 
-      g_set_object (&info->icon_helper, helper);
+      if (helper)
+        g_object_ref (helper);
+      if (info->icon_helper)
+        g_object_unref (info->icon_helper);
+      info->icon_helper = helper;
       gtk_drag_set_icon_window (context, NULL, hot_x, hot_y, TRUE);
     }
   else
-- 
2.4.5