]> git.draconx.ca Git - gentoo-fixes.git/blob - dev-python/pygobject/files/pygobject-2.28.6-set_qdata.patch
Resurrect dev-python/pygtk.
[gentoo-fixes.git] / dev-python / pygobject / files / pygobject-2.28.6-set_qdata.patch
1 From 42d871eb0b08ee6d55e95cc7e4b90844919555b9 Mon Sep 17 00:00:00 2001
2 From: Ivan Stankovic <ivan.stankovic@avl.com>
3 Date: Tue, 21 Feb 2012 12:24:58 +0100
4 Subject: [PATCH] Fix set_qdata warning on accessing NULL gobject property
5
6 https://bugzilla.gnome.org/show_bug.cgi?id=661155
7 ---
8  gobject/pygobject.c |    4 +++-
9  1 files changed, 3 insertions(+), 1 deletions(-)
10
11 diff --git a/gobject/pygobject.c b/gobject/pygobject.c
12 index 6c2f06c..70dc89a 100644
13 --- a/gobject/pygobject.c
14 +++ b/gobject/pygobject.c
15 @@ -991,7 +991,9 @@ pygobject_new(GObject *obj)
16  PyObject *
17  pygobject_new_sunk(GObject *obj)
18  {
19 -    g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1));
20 +    if (obj)
21 +       g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1));
22 +       
23      return pygobject_new_full(obj, TRUE, NULL);
24  }
25  
26 -- 
27 1.7.8.5
28