gst/gstbin.override (_wrap_gst_bin_get_by_name): Dude, like totally don't unref NULL...
authorAndy Wingo <wingo@pobox.com>
Thu, 20 Oct 2005 11:37:04 +0000 (11:37 +0000)
committerAndy Wingo <wingo@pobox.com>
Thu, 20 Oct 2005 11:37:04 +0000 (11:37 +0000)
Original commit message from CVS:
2005-10-20  Andy Wingo  <wingo@pobox.com>

* gst/gstbin.override (_wrap_gst_bin_get_by_name): Dude, like
totally don't unref NULL objects.

ChangeLog
gst/gstbin.override

index f39dd06..94bd1a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-20  Andy Wingo  <wingo@pobox.com>
+
+       * gst/gstbin.override (_wrap_gst_bin_get_by_name): Dude, like
+       totally don't unref NULL objects.
+
 2005-10-19  Edward Hervey  <edward@fluendo.com>
 
        * gst/gst-types.defs:
index d4d74d5..4d864b7 100644 (file)
@@ -136,7 +136,8 @@ _wrap_gst_bin_get_by_name(PyGObject *self, PyObject *args, PyObject *kwargs)
     
     /* pygobject_new handles NULL checking */
     ret = pygstobject_new((GObject *)el);
-    gst_object_unref (((PyGObject *) ret)->obj); /* from _get_by_name */
+    if (el)
+           gst_object_unref (el); /* from get_by_name */
     return ret;
 }
 %%