diff options
author | Gustavo J. A. M. Carneiro <gcarneiro@src.gnome.org> | 2004-06-20 13:45:20 +0000 |
---|---|---|
committer | Gustavo J. A. M. Carneiro <gcarneiro@src.gnome.org> | 2004-06-20 13:45:20 +0000 |
commit | 23c0453794076a8ff28d95093f20ddccf91f0f1d (patch) | |
tree | f729e3efdb2cc4bd3055c364c7a7c642177a75c5 | |
parent | 042f9bad8f061b7af69962c8b1f57797a587028c (diff) | |
download | pygtk-2-2.tar.gz |
Fixes Bug 137086 (gtk.gdk.window_lookup assertion)pygtk-2-2
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | codegen/argtypes.py | 3 |
2 files changed, 8 insertions, 1 deletions
@@ -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' + |