summaryrefslogtreecommitdiffstats
path: root/Modules/zipimport.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/zipimport.c')
-rw-r--r--Modules/zipimport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index fa4380c..637dc48 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -1167,6 +1167,8 @@ initzipimport(void)
mod = Py_InitModule4("zipimport", NULL, zipimport_doc,
NULL, PYTHON_API_VERSION);
+ if (mod == NULL)
+ return;
ZipImportError = PyErr_NewException("zipimport.ZipImportError",
PyExc_ImportError, NULL);