From 4e33f9fdccf2a0ea3783a7da5d6c06e9fe5f49d9 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 26 Jun 2008 09:14:51 +0000 Subject: [PATCH] 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 --- ChangeLog | 6 ++++++ gst/gstmodule.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6408ab73f2..1311d4b8e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-26 Edward Hervey + + * gst/gstmodule.c: (pygstminiobject_from_gvalue): + Return None if GstMiniObject GValue doesn't contain anything (NULL). + Fixes #540221 + 2008-06-20 Jan Schmidt * configure.ac: diff --git a/gst/gstmodule.c b/gst/gstmodule.c index e2f408f84b..4c6d483d6b 100644 --- a/gst/gstmodule.c +++ b/gst/gstmodule.c @@ -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); }