We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7c89c1 commit ea0bc2bCopy full SHA for ea0bc2b
python/_tskitmodule.c
@@ -326,8 +326,12 @@ make_population(tsk_population_t *population)
326
PyObject *ret = NULL;
327
PyObject *metadata = make_metadata(population->metadata,
328
(Py_ssize_t) population->metadata_length);
329
-
+ if (metadata == NULL) {
330
+ goto out;
331
+ }
332
ret = Py_BuildValue("(O)", metadata);
333
+out:
334
+ Py_XDECREF(metadata);
335
return ret;
336
}
337
0 commit comments