summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2007-02-04 10:44:40 +0000
committerEdward Hervey <bilboed@bilboed.com>2007-02-04 10:44:40 +0000
commit935a94da548dbc978691e326795e349f05c7dbba (patch)
tree2303c7daaad8281238d1548d54087a442afa9107
parent04a182516c0b42c1a087919faf985380ffd2acdd (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--ChangeLog6
-rw-r--r--gst/interfaces.override16
2 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b6aecc..37856a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
}