Skip to content

Commit

Permalink
Fix crash in debug builds due to missing Py_INCREF
Browse files Browse the repository at this point in the history
  • Loading branch information
colesbury committed Jan 14, 2022
1 parent d631950 commit a022779
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bindings/pycldmodule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ init_pycld2()
}

// Steals ref:
Py_INCREF(st->error);
PyModule_AddObject(m, "error", st->error);
#ifdef IS_PY3K
return m;
Expand Down

0 comments on commit a022779

Please sign in to comment.