Skip to content
Prev Previous commit
Next Next commit
Add initialisation guard
  • Loading branch information
Erlend E. Aasland committed Jan 11, 2021
commit 2448e931616136441aa5bf1294ab426107b19396
3 changes: 3 additions & 0 deletions Modules/_elementtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -4302,6 +4302,9 @@ static struct PyModuleDef elementtreemodule = {

#define CREATE_TYPE(module, type, spec) \
do { \
if (type != NULL) { \
break; \
} \
type = (PyTypeObject *)PyType_FromModuleAndSpec(module, spec, NULL); \
if (type == NULL) { \
goto error; \
Expand Down