gstmodule: Check for Py_None when setting a miniobject

Check if we got a None value before trying to use it as a
PyGstMiniObject.

https://bugzilla.gnome.org/show_bug.cgi?id=649227
This commit is contained in:
Thiago Santos 2011-05-02 16:59:30 -03:00
parent ee06493714
commit 501515522f

View file

@ -75,7 +75,8 @@ pygstminiobject_to_gvalue (GValue * value, PyObject * obj)
{
PyGstMiniObject *self = (PyGstMiniObject *) obj;
gst_value_set_mini_object (value, self->obj);
gst_value_set_mini_object (value, obj == Py_None ? NULL : self->obj);
return 0;
}