diff --git a/python/_tskitmodule.c b/python/_tskitmodule.c index 0d89a677dc..fde6da8b19 100644 --- a/python/_tskitmodule.c +++ b/python/_tskitmodule.c @@ -13259,12 +13259,12 @@ LsHmm_forward_matrix(LsHmm *self, PyObject *args) = tsk_ls_hmm_forward(self->ls_hmm, PyArray_DATA(haplotype_array), compressed_matrix->compressed_matrix, TSK_NO_INIT); Py_END_ALLOW_THREADS - // clang-format on - if (err != 0) + if (err != 0) { handle_library_error(err); goto out; } + // clang-format on ret = Py_BuildValue(""); out: Py_XDECREF(haplotype_array);