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:
parent
ee06493714
commit
501515522f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user