diff options
-rw-r--r-- | Modules/_elementtree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index 7887721..d734c26 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -3117,6 +3117,8 @@ PyInit__elementtree(void) expat_capi->MICRO_VERSION != XML_MICRO_VERSION) expat_capi = NULL; } + if (!expat_capi) + return NULL; #endif elementtree_parseerror_obj = PyErr_NewException( |