diff options
author | Edward Hervey <bilboed@bilboed.com> | 2007-02-04 10:44:40 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2007-02-04 10:44:40 +0000 |
commit | 935a94da548dbc978691e326795e349f05c7dbba (patch) | |
tree | 2303c7daaad8281238d1548d54087a442afa9107 | |
parent | 04a182516c0b42c1a087919faf985380ffd2acdd (diff) |
gst/interfaces.override: Gracefully handle the case where gst_property_probe_get_values_name() returns NULL.
Original commit message from CVS:
* gst/interfaces.override:
Gracefully handle the case where gst_property_probe_get_values_name()
returns NULL.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gst/interfaces.override | 16 |
2 files changed, 15 insertions, 7 deletions
@@ -1,3 +1,9 @@ +2007-02-04 Edward Hervey <edward@fluendo.com> + + * gst/interfaces.override: + Gracefully handle the case where gst_property_probe_get_values_name() + returns NULL. + 2007-02-04 Johan Dahlin <johan@gnome.org> reviewed by: Edward Hervey <edward@fluendo.com> diff --git a/gst/interfaces.override b/gst/interfaces.override index 12d8f55..d5edf86 100644 --- a/gst/interfaces.override +++ b/gst/interfaces.override @@ -307,14 +307,16 @@ _wrap_gst_property_probe_get_values_name (PyGObject *self, PyObject *args) name); py_list = PyList_New(0); - for (i = 0; i < array->n_values; i++) { - GValue *value = g_value_array_get_nth(array, i); - PyObject *py_value = pyg_value_as_pyobject(value, TRUE); - PyList_Append(py_list, py_value); - Py_DECREF(py_value); - + if (array) { + for (i = 0; i < array->n_values; i++) { + GValue *value = g_value_array_get_nth(array, i); + PyObject *py_value = pyg_value_as_pyobject(value, TRUE); + PyList_Append(py_list, py_value); + Py_DECREF(py_value); + + } + g_value_array_free(array); } - g_value_array_free(array); return py_list; } |