summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo J. A. M. Carneiro <gcarneiro@src.gnome.org>2004-06-20 13:45:20 +0000
committerGustavo J. A. M. Carneiro <gcarneiro@src.gnome.org>2004-06-20 13:45:20 +0000
commit23c0453794076a8ff28d95093f20ddccf91f0f1d (patch)
treef729e3efdb2cc4bd3055c364c7a7c642177a75c5
parent042f9bad8f061b7af69962c8b1f57797a587028c (diff)
downloadpygtk-2-2.tar.gz
Fixes Bug 137086 (gtk.gdk.window_lookup assertion)pygtk-2-2
-rw-r--r--ChangeLog6
-rw-r--r--codegen/argtypes.py3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f30cb983..32658f2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-06-20 Scott Tsai <scottt958@yahoo.com.tw>
+
+ * codegen/argtypes.py (ObjectArg.write_return): Check for NULL
+ GObject before unreffing. Fixes Bug 137086 (gtk.gdk.window_lookup
+ assertion). (reviewed by Gustavo Carneiro)
+
2004-04-04 Gustavo J. A. M. Carneiro <gustavo@users.sourceforge.net>
* gtk/gdk.override (_wrap_gdk_window_new): If compiling for win32
diff --git a/codegen/argtypes.py b/codegen/argtypes.py
index ca1e67c0..0f0dde26 100644
--- a/codegen/argtypes.py
+++ b/codegen/argtypes.py
@@ -417,7 +417,8 @@ class ObjectArg(ArgType):
if ownsreturn:
info.varlist.add('PyObject', '*py_ret')
info.codeafter.append(' py_ret = pygobject_new((GObject *)ret);\n'
- ' g_object_unref(ret);\n'
+ ' if (ret != NULL)\n'
+ ' g_object_unref(ret);\n'
' return py_ret;')
else:
info.codeafter.append(' /* pygobject_new handles NULL checking */\n' +