Skip to content

Commit 2448e93

Browse files
author
Erlend E. Aasland
committed
Add initialisation guard
1 parent 525cfaf commit 2448e93

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Modules/_elementtree.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4302,6 +4302,9 @@ static struct PyModuleDef elementtreemodule = {
43024302

43034303
#define CREATE_TYPE(module, type, spec) \
43044304
do { \
4305+
if (type != NULL) { \
4306+
break; \
4307+
} \
43054308
type = (PyTypeObject *)PyType_FromModuleAndSpec(module, spec, NULL); \
43064309
if (type == NULL) { \
43074310
goto error; \

0 commit comments

Comments
 (0)