mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue