diff --git a/src/pyvalues.c b/src/pyvalues.c
index 4f5c4ce3ac41eb46f3172e5d8b0cee89a5d50b37..78e6cf9d450413ed242fb73e6126a09f4dd86057 100644 (file)
--- a/src/pyvalues.c
+++ b/src/pyvalues.c
cpy_log_exception("building meta data");
return NULL;
}
-
s = PyList_Size(l);
- if (s < 0)
+ if (s <= 0) {
+ Py_XDECREF(l);
return NULL;
+ }
m = meta_data_create();
for (i = 0; i < s; ++i) {