From a0227798265698aeff0fb457fa35a2e4e0f543a5 Mon Sep 17 00:00:00 2001 From: Sam Gross Date: Fri, 14 Jan 2022 07:13:26 -0800 Subject: [PATCH] Fix crash in debug builds due to missing Py_INCREF Fixes #50 --- bindings/pycldmodule.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/pycldmodule.cc b/bindings/pycldmodule.cc index df47ef7..fee3625 100644 --- a/bindings/pycldmodule.cc +++ b/bindings/pycldmodule.cc @@ -642,6 +642,7 @@ init_pycld2() } // Steals ref: + Py_INCREF(st->error); PyModule_AddObject(m, "error", st->error); #ifdef IS_PY3K return m;