gst/gstmodule.c: Return None if GstMiniObject GValue doesn't contain anything (NULL).

Original commit message from CVS:
* gst/gstmodule.c: (pygstminiobject_from_gvalue):
Return None if GstMiniObject GValue doesn't contain anything (NULL).
Fixes #540221
This commit is contained in:
Edward Hervey 2008-06-26 09:14:51 +00:00
parent f2505d6ec6
commit 4e33f9fdcc
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2008-06-26 Edward Hervey <edward.hervey@collabora.co.uk>
* gst/gstmodule.c: (pygstminiobject_from_gvalue):
Return None if GstMiniObject GValue doesn't contain anything (NULL).
Fixes #540221
2008-06-20 Jan Schmidt <jan.schmidt@sun.com>
* configure.ac:

View file

@ -63,8 +63,10 @@ pygstminiobject_from_gvalue(const GValue *value)
{
GstMiniObject *miniobj;
if ((miniobj = gst_value_get_mini_object (value)) == NULL)
return NULL;
if ((miniobj = gst_value_get_mini_object (value)) == NULL) {
Py_INCREF(Py_None);
return Py_None;
}
return pygstminiobject_new(miniobj);
}