From 501515522f2f330aefa42882952ad016e16d897d Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Mon, 2 May 2011 16:59:30 -0300 Subject: [PATCH] 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 --- gst/gstmodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/gstmodule.c b/gst/gstmodule.c index fd66dff..2a37f8e 100644 --- a/gst/gstmodule.c +++ b/gst/gstmodule.c @@ -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; } -- 2.7.4