diff options
author | Hye-Shik Chang <hyeshik@gmail.com> | 2006-03-06 07:51:19 (GMT) |
---|---|---|
committer | Hye-Shik Chang <hyeshik@gmail.com> | 2006-03-06 07:51:19 (GMT) |
commit | 32feb8592f8e7b09a0f7c46a82851628d1c77d34 (patch) | |
tree | 3fe829ef2af017e91a7922ee74111661d7551e55 /Modules | |
parent | 82f6cc4728353cf169d45e7a1499226896500ed8 (diff) | |
download | cpython-32feb8592f8e7b09a0f7c46a82851628d1c77d34.zip cpython-32feb8592f8e7b09a0f7c46a82851628d1c77d34.tar.gz cpython-32feb8592f8e7b09a0f7c46a82851628d1c77d34.tar.bz2 |
Check NULL if Py_InitModule fails.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/cjkcodecs/cjkcodecs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h index 9c32162..b266c8f 100644 --- a/Modules/cjkcodecs/cjkcodecs.h +++ b/Modules/cjkcodecs/cjkcodecs.h @@ -388,7 +388,8 @@ errorexit: init_codecs_##loc(void) \ { \ PyObject *m = Py_InitModule("_codecs_" #loc, __methods);\ - (void)register_maps(m); \ + if (m != NULL) \ + (void)register_maps(m); \ } #endif |